Class: Organizer::Response
- Inherits:
-
Object
- Object
- Organizer::Response
- Defined in:
- lib/organizer/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#method ⇒ Object
Returns the value of attribute method.
-
#status ⇒ Object
Returns the value of attribute status.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 10 |
# File 'lib/organizer/response.rb', line 5 def initialize(data) @body = JSON.parse(data.env.body) @url = data.env.url @method = data.env.method @status = data.env.status end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/organizer/response.rb', line 3 def body @body end |
#method ⇒ Object
Returns the value of attribute method.
3 4 5 |
# File 'lib/organizer/response.rb', line 3 def method @method end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/organizer/response.rb', line 3 def status @status end |
#url ⇒ Object
Returns the value of attribute url.
3 4 5 |
# File 'lib/organizer/response.rb', line 3 def url @url end |