瀏覽代碼

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))