소스 검색

Unwrap close and open methods

This is needed to keep the class coding style, improving readability
Vinicius Brasil 7 년 전
부모
커밋
0b37ca8072
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      lib/shopify_api/resources/order.rb

+ 7 - 2
lib/shopify_api/resources/order.rb

@@ -3,8 +3,13 @@ module ShopifyAPI
     include Events
     include Metafields
 
-    def close;  load_attributes_from_response(post(:close, {}, only_id)); end
-    def open;   load_attributes_from_response(post(:open, {}, only_id)); end
+    def close
+      load_attributes_from_response(post(:close, {}, only_id))
+    end
+
+    def open
+      load_attributes_from_response(post(:open, {}, only_id))
+    end
 
     def cancel(options = {})
       load_attributes_from_response(post(:cancel, {}, options.to_json))