Class: OpenExchangeRates::Response
- Inherits:
-
Object
- Object
- OpenExchangeRates::Response
- Defined in:
- lib/open_exchange_rates/response.rb
Instance Attribute Summary collapse
-
#raw_data ⇒ Object
readonly
Returns the value of attribute raw_data.
Instance Method Summary collapse
- #base_currency ⇒ Object (also: #base)
-
#initialize(raw_data) ⇒ Response
constructor
A new instance of Response.
- #rates ⇒ Object
Constructor Details
#initialize(raw_data) ⇒ Response
Returns a new instance of Response.
6 7 8 |
# File 'lib/open_exchange_rates/response.rb', line 6 def initialize(raw_data) @raw_data = raw_data end |
Instance Attribute Details
#raw_data ⇒ Object (readonly)
Returns the value of attribute raw_data.
4 5 6 |
# File 'lib/open_exchange_rates/response.rb', line 4 def raw_data @raw_data end |
Instance Method Details
#base_currency ⇒ Object Also known as: base
14 15 16 |
# File 'lib/open_exchange_rates/response.rb', line 14 def base_currency raw_data["base"] end |
#rates ⇒ Object
10 11 12 |
# File 'lib/open_exchange_rates/response.rb', line 10 def rates raw_data["rates"] end |