Class: Twingly::HTTP::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(headers: nil, status: nil, body: nil, final_url: nil) ⇒ Response

Returns a new instance of Response.



265
266
267
268
269
270
271
272
273
# File 'lib/twingly/http.rb', line 265

def initialize(headers: nil,
               status: nil,
               body: nil,
               final_url: nil)
  @headers       = headers
  @status        = status
  @body          = body
  @final_url     = final_url
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



262
263
264
# File 'lib/twingly/http.rb', line 262

def body
  @body
end

#final_urlObject (readonly)

Returns the value of attribute final_url.



263
264
265
# File 'lib/twingly/http.rb', line 263

def final_url
  @final_url
end

#headersObject (readonly)

Returns the value of attribute headers.



260
261
262
# File 'lib/twingly/http.rb', line 260

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



261
262
263
# File 'lib/twingly/http.rb', line 261

def status
  @status
end