Class: Minato::Utils::Response
- Inherits:
-
Object
- Object
- Minato::Utils::Response
- Defined in:
- lib/minato/utils/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 |
# File 'lib/minato/utils/response.rb', line 8 def initialize(response) @code = response.code @header = response.header.to_hash || {} @body = Helpers.parse_json(response.body) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/minato/utils/response.rb', line 6 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/minato/utils/response.rb', line 6 def code @code end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
6 7 8 |
# File 'lib/minato/utils/response.rb', line 6 def header @header end |