Class: Clientele::Response
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Clientele::Response
- Defined in:
- lib/clientele/response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
20 21 22 |
# File 'lib/clientele/response.rb', line 20 def initialize(response) super @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
19 20 21 |
# File 'lib/clientele/response.rb', line 19 def response @response end |
Class Method Details
.build(response, resource, client) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/clientele/response.rb', line 10 def build(response, resource, client) if resource resource.build(response.body, response: response, client: client) else new response end end |