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.



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

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.



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

def body
  @body
end

#final_urlObject (readonly)

Returns the value of attribute final_url.



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

def final_url
  @final_url
end

#headersObject (readonly)

Returns the value of attribute headers.



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

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end