Class: Roca::Connector

Inherits:
Object
  • Object
show all
Defined in:
lib/roca/connector.rb

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Connector

Returns a new instance of Connector.



4
5
6
7
# File 'lib/roca/connector.rb', line 4

def initialize(args = {})
  @xmlrpc_client  = args[:xmlrpc_client] || build_xmlrpc_client(args[:endpoint])
  @session_string = args[:session_string]
end

Instance Method Details

#execute(method, *args) ⇒ Object



9
10
11
12
# File 'lib/roca/connector.rb', line 9

def execute(method, *args)
  args = args.unshift(@session_string)
  @xmlrpc_client.call_async(method, *args)
end