Class: OpenCharities::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



7
8
9
10
# File 'lib/open_charities/response.rb', line 7

def initialize(response)
  check_for_errors(response)
  parse_response(response)
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



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

def attributes
  @attributes
end

Instance Method Details

#[](key) ⇒ Object



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

def [](key)
  @attributes[key]
end