Class: Dmm::Response
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #method_missing(method, *args) ⇒ Object
- #respond_to?(method, include_private = false) ⇒ Boolean
- #respond_to_missing?(method, include_private = false) ⇒ Boolean
-
#result ⇒ Dmm::Result
Delegate to a Dmm::Result.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Dmm::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
16 17 18 19 |
# File 'lib/dmm/response.rb', line 16 def method_missing(method, *args) return super unless result.respond_to? method.to_sym result.send(method.to_sym) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
6 7 8 |
# File 'lib/dmm/response.rb', line 6 def response @response end |
Instance Method Details
#respond_to?(method, include_private = false) ⇒ Boolean
22 |
# File 'lib/dmm/response.rb', line 22 def respond_to?(method, include_private = false); result.respond_to?(method.to_sym, include_private) || super; end |
#respond_to_missing?(method, include_private = false) ⇒ Boolean
21 |
# File 'lib/dmm/response.rb', line 21 def respond_to_missing?(method, include_private = false); result.respond_to?(method.to_sym, include_private) || super; end |
#result ⇒ Dmm::Result
Delegate to a Dmm::Result
11 12 13 14 |
# File 'lib/dmm/response.rb', line 11 def result @result ||= Dmm::Result.new @attrs[:response][:result] @result end |