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.



206
207
208
209
210
211
212
# File 'lib/twingly/http.rb', line 206

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.



204
205
206
# File 'lib/twingly/http.rb', line 204

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



202
203
204
# File 'lib/twingly/http.rb', line 202

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



203
204
205
# File 'lib/twingly/http.rb', line 203

def status
  @status
end