Module: OvhRb::SoapRequestHandler
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#session_id ⇒ Object
Returns the value of attribute session_id.
-
#soap_object ⇒ Object
Returns the value of attribute soap_object.
Class Method Summary collapse
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ovhrb/soap_request_handler.rb', line 7 def method_missing(name, *args) soap_method_name = name.to_s.camelize(:lower) if soap_object.respond_to? soap_method_name self.class.class_eval do define_method_used = "define_#{(soap_method_name=="login"? "login" : "soapi")}_method" send(define_method_used, name, soap_method_name) end send(name, *args) else super end end |
Instance Attribute Details
#session_id ⇒ Object
Returns the value of attribute session_id.
5 6 7 |
# File 'lib/ovhrb/soap_request_handler.rb', line 5 def session_id @session_id end |
#soap_object ⇒ Object
Returns the value of attribute soap_object.
5 6 7 |
# File 'lib/ovhrb/soap_request_handler.rb', line 5 def soap_object @soap_object end |
Class Method Details
.included(base) ⇒ Object
21 22 23 |
# File 'lib/ovhrb/soap_request_handler.rb', line 21 def self.included(base) base.extend(ClassMethods) end |