Module: ActiveRemote::RPC

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/active_remote/rpc.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#assign_attributes_from_rpc(response) ⇒ Object



55
56
57
58
# File 'lib/active_remote/rpc.rb', line 55

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



60
61
62
# File 'lib/active_remote/rpc.rb', line 60

def remote_call(rpc_method, request_args)
  self.class.remote_call(rpc_method, request_args)
end

#rpcObject



64
65
66
# File 'lib/active_remote/rpc.rb', line 64

def rpc
  self.class.rpc
end