Просмотр исходного кода

Unwrap close and open methods

This is needed to keep the class coding style, improving readability
Vinicius Brasil 7 лет назад
Родитель
Сommit
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))