Class: HTTP::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body, code, headers, response) ⇒ Response

Returns a new instance of Response.



13
14
15
16
17
18
# File 'lib/http/http.rb', line 13

def initialize(body, code, headers, response)
  self.parsed_body = body
  self.code = code
  self.headers = headers
  self.http_response = response
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



11
12
13
# File 'lib/http/http.rb', line 11

def code
  @code
end

#headersObject

Returns the value of attribute headers.



11
12
13
# File 'lib/http/http.rb', line 11

def headers
  @headers
end

#http_responseObject

Returns the value of attribute http_response.



11
12
13
# File 'lib/http/http.rb', line 11

def http_response
  @http_response
end

#parsed_bodyObject

Returns the value of attribute parsed_body.



11
12
13
# File 'lib/http/http.rb', line 11

def parsed_body
  @parsed_body
end