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) ⇒ Response

Returns a new instance of Response.



262
263
264
265
266
267
268
# File 'lib/twingly/http.rb', line 262

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



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

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end