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.



212
213
214
215
216
217
218
# File 'lib/twingly/http.rb', line 212

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.



210
211
212
# File 'lib/twingly/http.rb', line 210

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



208
209
210
# File 'lib/twingly/http.rb', line 208

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



209
210
211
# File 'lib/twingly/http.rb', line 209

def status
  @status
end