Class: YetisNode::XmlRpcTransport

Inherits:
BaseTransport show all
Defined in:
lib/yetis_node/xml_rpc_transport.rb

Constant Summary

Constants inherited from BaseTransport

BaseTransport::DEFAULT_TIMEOUT

Instance Attribute Summary

Attributes inherited from BaseTransport

#options, #uri

Instance Method Summary collapse

Methods inherited from BaseTransport

#initialize

Constructor Details

This class inherits a constructor from YetisNode::BaseTransport

Instance Method Details

#rpc_send(*args) ⇒ Object



6
7
8
9
10
# File 'lib/yetis_node/xml_rpc_transport.rb', line 6

def rpc_send(*args)
  xml_rpc.call_async('di', 'yeti', *args)
rescue XMLRPC::FaultException => e
  raise Error.new(e.message)
end

#xml_rpcObject



12
13
14
# File 'lib/yetis_node/xml_rpc_transport.rb', line 12

def xml_rpc
  @xml_rpc ||= XMLRPC::Client.new2 uri, options.fetch(:timeout, BaseTransport::DEFAULT_TIMEOUT)
end