Module: Magento::Base::ClassMethods
- Included in:
- Magento::Base
- Defined in:
- lib/magento/base.rb
Instance Method Summary collapse
-
#commit(method, *args) ⇒ Object
Uses the classes name and method to make an rpc call through connection.
Instance Method Details
#commit(method, *args) ⇒ Object
Uses the classes name and method to make an rpc call through connection
16 17 18 19 20 |
# File 'lib/magento/base.rb', line 16 def commit(method, *args) # TODO: need to catch errors sent back from magento and bubble them up appropriately method = "#{to_s.split('::').last.underscore.downcase}.#{method}" Magento::Base.connection.call(method, *args) end |