Class: OvhRb::Session
- Inherits:
-
Object
- Object
- OvhRb::Session
- Includes:
- SoapRequestHandler
- Defined in:
- lib/ovhrb/session.rb
Instance Attribute Summary
Attributes included from SoapRequestHandler
Instance Method Summary collapse
-
#initialize(nic, password, language = 'en', mulisession = true, wsdl = "https://www.ovh.com/soapi/soapi-re-1.9.wsdl") ⇒ Session
constructor
A new instance of Session.
Methods included from SoapRequestHandler
Constructor Details
#initialize(nic, password, language = 'en', mulisession = true, wsdl = "https://www.ovh.com/soapi/soapi-re-1.9.wsdl") ⇒ Session
Returns a new instance of Session.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ovhrb/session.rb', line 5 def initialize(nic, password, language = 'en', mulisession = true, wsdl = "https://www.ovh.com/soapi/soapi-re-1.9.wsdl") @nic = nic @password = password @language = language @multisession = mulisession self.soap_object = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver @session_id = login(@nic, @password, @language, @multisession) if block_given? begin yield self # ensure # logout end end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OvhRb::SoapRequestHandler