Class: MachineGun::Response
- Inherits:
-
Object
- Object
- MachineGun::Response
- Defined in:
- lib/machine-gun/response.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#id ⇒ Object
Returns the value of attribute id.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(id) ⇒ Response
constructor
A new instance of Response.
- #payload_as_json ⇒ Object
Constructor Details
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/machine-gun/response.rb', line 5 def headers @headers end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/machine-gun/response.rb', line 3 def id @id end |
#payload ⇒ Object
Returns the value of attribute payload.
6 7 8 |
# File 'lib/machine-gun/response.rb', line 6 def payload @payload end |
#status_code ⇒ Object
Returns the value of attribute status_code.
4 5 6 |
# File 'lib/machine-gun/response.rb', line 4 def status_code @status_code end |
Instance Method Details
#payload_as_json ⇒ Object
17 18 19 |
# File 'lib/machine-gun/response.rb', line 17 def payload_as_json JSON.load(@payload) end |