Class: Response
- Inherits:
-
Object
- Object
- Response
- Defined in:
- lib/response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#content ⇒ Object
Returns the value of attribute content.
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
4 5 6 7 8 |
# File 'lib/response.rb', line 4 def initialize data @code = data['code'] @content = data['body'] @headers = data['headers'] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
2 3 4 |
# File 'lib/response.rb', line 2 def code @code end |
#content ⇒ Object
Returns the value of attribute content.
2 3 4 |
# File 'lib/response.rb', line 2 def content @content end |
#headers ⇒ Object
Returns the value of attribute headers.
2 3 4 |
# File 'lib/response.rb', line 2 def headers @headers end |