Class: OpenCharities::Response
- Inherits:
-
Object
- Object
- OpenCharities::Response
- Defined in:
- lib/open_charities/response.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
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
#attributes ⇒ Object (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 |