Class: StarkCore::Utils::Request::Response
- Inherits:
-
Object
- Object
- StarkCore::Utils::Request::Response
- Defined in:
- lib/utils/request.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, content) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
Constructor Details
#initialize(status, content) ⇒ Response
Returns a new instance of Response.
15 16 17 18 |
# File 'lib/utils/request.rb', line 15 def initialize(status, content) @status = status @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
14 15 16 |
# File 'lib/utils/request.rb', line 14 def content @content end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/utils/request.rb', line 14 def status @status end |
Instance Method Details
#json ⇒ Object
20 21 22 |
# File 'lib/utils/request.rb', line 20 def json JSON.parse(@content) end |