Explorar o código

Unwrap close and open methods

This is needed to keep the class coding style, improving readability
Vinicius Brasil %!s(int64=7) %!d(string=hai) anos
pai
achega
0b37ca8072
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  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))