Class: HTTP::Response::BodyDelegator

Inherits:
Delegator
  • Object
show all
Defined in:
lib/http/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject (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