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
55 56 57 58 59 |
# File 'lib/active_remote/rpc.rb', line 55 def assign_attributes_from_rpc(response) new_attributes = self.class.build_from_rpc(response.to_hash) @attributes.update(new_attributes) add_errors(response.errors) if response.respond_to?(:errors) end |
#remote_call(rpc_method, request_args) ⇒ Object
61 62 63 |
# File 'lib/active_remote/rpc.rb', line 61 def remote_call(rpc_method, request_args) self.class.remote_call(rpc_method, request_args) end |
#rpc ⇒ Object
65 66 67 |
# File 'lib/active_remote/rpc.rb', line 65 def rpc self.class.rpc end |