Class: HTTP::Response::BodyDelegator
- Inherits:
-
Delegator
- Object
- Delegator
- HTTP::Response::BodyDelegator
- Defined in:
- lib/http/response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #__getobj__ ⇒ Object
- #__setobj__(obj) ⇒ Object
-
#initialize(response, body = response.body) ⇒ BodyDelegator
constructor
A new instance of BodyDelegator.
Constructor Details
#initialize(response, body = response.body) ⇒ BodyDelegator
Returns a new instance of BodyDelegator.
151 152 153 154 |
# File 'lib/http/response.rb', line 151 def initialize(response, body = response.body) super(body) @response, @body = response, body end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
149 150 151 |
# File 'lib/http/response.rb', line 149 def response @response end |
Instance Method Details
#__getobj__ ⇒ Object
156 |
# File 'lib/http/response.rb', line 156 def __getobj__; @body; end |
#__setobj__(obj) ⇒ Object
157 |
# File 'lib/http/response.rb', line 157 def __setobj__(obj); @body = obj; end |