Class: Workarea::Yotpo::Response
- Inherits:
-
Object
- Object
- Workarea::Yotpo::Response
- Defined in:
- lib/workarea/yotpo/response.rb
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
4 5 6 |
# File 'lib/workarea/yotpo/response.rb', line 4 def initialize(response) @response = response end |
Instance Method Details
#body ⇒ Object
12 13 14 |
# File 'lib/workarea/yotpo/response.rb', line 12 def body @body ||= JSON.parse(@response.body) end |
#success? ⇒ Boolean
8 9 10 |
# File 'lib/workarea/yotpo/response.rb', line 8 def success? @response.success? end |