Class: JsonClient::Response
- Inherits:
-
Object
- Object
- JsonClient::Response
- Defined in:
- lib/json_client/response.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(raw_response) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
- #method_missing(name, *args) ⇒ Object
Constructor Details
#initialize(raw_response) ⇒ Response
Returns a new instance of Response.
5 6 7 |
# File 'lib/json_client/response.rb', line 5 def initialize(raw_response) @raw_response = raw_response end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
9 10 11 |
# File 'lib/json_client/response.rb', line 9 def method_missing(name, *args) raw_response.public_send(name, *args) end |
Instance Attribute Details
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
3 4 5 |
# File 'lib/json_client/response.rb', line 3 def raw_response @raw_response end |
Instance Method Details
#json ⇒ Object
13 14 15 |
# File 'lib/json_client/response.rb', line 13 def json parse_json end |