Module: ActiveRemote::RPC
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #assign_attributes_from_rpc(response) ⇒ Object
- #remote_call(rpc_method, request_args) ⇒ Object
- #rpc ⇒ Object
Instance Method Details
#assign_attributes_from_rpc(response) ⇒ Object
54 55 56 57 |
# File 'lib/active_remote/rpc.rb', line 54 def assign_attributes_from_rpc(response) @attributes = self.class.build_from_rpc(response.to_hash) add_errors(response.errors) if response.respond_to?(:errors) end |
#remote_call(rpc_method, request_args) ⇒ Object
59 60 61 |
# File 'lib/active_remote/rpc.rb', line 59 def remote_call(rpc_method, request_args) self.class.remote_call(rpc_method, request_args) end |
#rpc ⇒ Object
63 64 65 |
# File 'lib/active_remote/rpc.rb', line 63 def rpc self.class.rpc end |