Class: Response
- Inherits:
-
Object
- Object
- Response
- Defined in:
- lib/response.rb
Overview
response.rb
~~~~~~~~~
This module implements the Response class.
:authors: Konstantin Bokarius.
:copyright: (c) 2015 by Fanout, Inc.
:license: MIT, see LICENSE for more details.
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#reason ⇒ Object
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(code = nil, reason = nil, headers = nil, body = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(code = nil, reason = nil, headers = nil, body = nil) ⇒ Response
Returns a new instance of Response.
14 15 16 17 18 19 |
# File 'lib/response.rb', line 14 def initialize(code=nil, reason=nil, headers=nil, body=nil) @code = code @reason = reason @headers = headers @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
12 13 14 |
# File 'lib/response.rb', line 12 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
9 10 11 |
# File 'lib/response.rb', line 9 def code @code end |
#headers ⇒ Object
Returns the value of attribute headers.
11 12 13 |
# File 'lib/response.rb', line 11 def headers @headers end |
#reason ⇒ Object
Returns the value of attribute reason.
10 11 12 |
# File 'lib/response.rb', line 10 def reason @reason end |