Class: Roca::Connector
- Inherits:
-
Object
- Object
- Roca::Connector
- Defined in:
- lib/roca/connector.rb
Instance Method Summary collapse
- #execute(method, *args) ⇒ Object
-
#initialize(args = {}) ⇒ Connector
constructor
A new instance of Connector.
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 |