Module: ActiveRemote::RPC::Embedded
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/active_remote/rpc.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#execute(rpc_method, request_args) ⇒ Object
:noapi:.
-
#remote_call(rpc_method, request_args) ⇒ Object
:noapi:.
Instance Method Details
#execute(rpc_method, request_args) ⇒ Object
:noapi:
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/active_remote/rpc.rb', line 40 def execute(rpc_method, request_args) warn "DEPRECATED Model#execute is deprecated and will be removed in Active Remote 3.0. Use Model#rpc.execute instead" @last_request = request(rpc_method, request_args) _service_class.client.__send__(rpc_method, @last_request) do |c| # In the event of service failure, raise the error. c.on_failure do |error| raise ActiveRemoteError, error. end # In the event of service success, assign the response. c.on_success do |response| @last_response = response end end @last_response end |
#remote_call(rpc_method, request_args) ⇒ Object
:noapi:
62 63 64 65 66 |
# File 'lib/active_remote/rpc.rb', line 62 def remote_call(rpc_method, request_args) warn "DEPRECATED Model#remote_call is deprecated and will be removed in Active Remote 3.0. Use Model#rpc.execute instead" rpc.execute(rpc_method, request_args) end |