Class: RubyBranch::API::Response
- Inherits:
-
Object
- Object
- RubyBranch::API::Response
- Extended by:
- Forwardable
- Defined in:
- lib/ruby_branch/api/response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
- #json ⇒ Object
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
10 11 12 |
# File 'lib/ruby_branch/api/response.rb', line 10 def initialize(response) @response = response end |
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/ruby_branch/api/response.rb', line 7 def response @response end |
Instance Method Details
#json ⇒ Object
14 15 16 |
# File 'lib/ruby_branch/api/response.rb', line 14 def json JSON.parse(body, symbolize_names: true) end |