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