Class: RubyBranch::API::Response

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/ruby_branch/api/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#responseObject

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

#jsonObject



14
15
16
# File 'lib/ruby_branch/api/response.rb', line 14

def json
  JSON.parse(body, symbolize_names: true)
end