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.



276
277
278
279
280
281
282
283
284
# File 'lib/twingly/http.rb', line 276

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.



273
274
275
# File 'lib/twingly/http.rb', line 273

def body
  @body
end

#final_urlObject (readonly)

Returns the value of attribute final_url.



274
275
276
# File 'lib/twingly/http.rb', line 274

def final_url
  @final_url
end

#headersObject (readonly)

Returns the value of attribute headers.



271
272
273
# File 'lib/twingly/http.rb', line 271

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



272
273
274
# File 'lib/twingly/http.rb', line 272

def status
  @status
end