Class: Rubydmmd::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/rubydmmd/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(faraday_response) ⇒ Response

Returns a new instance of Response.



5
6
7
# File 'lib/rubydmmd/response.rb', line 5

def initialize(faraday_response)
  @response = faraday_response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/rubydmmd/response.rb', line 9

def response
  @response
end

Instance Method Details

#resultObject



11
12
13
14
# File 'lib/rubydmmd/response.rb', line 11

def result
  body = response.body.deep_symbolize_keys
  body[:result]
end