Class: OpenX::XmlrpcSessionClient
- Inherits:
-
XmlrpcClient
- Object
- XmlrpcClient
- OpenX::XmlrpcSessionClient
- Defined in:
- lib/openx/xmlrpc_client.rb
Constant Summary
Constants inherited from XmlrpcClient
OpenX::XmlrpcClient::EXCEPTION_CLASSES
Instance Attribute Summary collapse
-
#session ⇒ Object
readonly
Returns the value of attribute session.
Attributes inherited from XmlrpcClient
Instance Method Summary collapse
- #call(method, *args) ⇒ Object
-
#initialize(session) ⇒ XmlrpcSessionClient
constructor
A new instance of XmlrpcSessionClient.
Constructor Details
#initialize(session) ⇒ XmlrpcSessionClient
Returns a new instance of XmlrpcSessionClient.
54 55 56 57 |
# File 'lib/openx/xmlrpc_client.rb', line 54 def initialize(session) @session = session super(session.url) end |
Instance Attribute Details
#session ⇒ Object (readonly)
Returns the value of attribute session.
52 53 54 |
# File 'lib/openx/xmlrpc_client.rb', line 52 def session @session end |
Instance Method Details
#call(method, *args) ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/openx/xmlrpc_client.rb', line 59 def call(method, *args) super rescue XMLRPC::FaultException => e cycle = (cycle || 0) + 1 raise(e) if cycle > 10 || e. !~ /Session ID.*invalid/i session.recreate! retry end |