Class: FixerApiClient::CurrencyData
- Inherits:
-
Object
- Object
- FixerApiClient::CurrencyData
- Defined in:
- lib/fixer_api_client/currency_data.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.rates ⇒ Object
7 8 9 |
# File 'lib/fixer_api_client/currency_data.rb', line 7 def self.rates new.rates end |
.rates_creation_date ⇒ Object
15 16 17 |
# File 'lib/fixer_api_client/currency_data.rb', line 15 def self.rates_creation_date new.rates_creation_date end |
.symbols ⇒ Object
11 12 13 |
# File 'lib/fixer_api_client/currency_data.rb', line 11 def self.symbols new.symbols end |
Instance Method Details
#rates ⇒ Object
24 25 26 |
# File 'lib/fixer_api_client/currency_data.rb', line 24 def rates @rates ||= parse(rates_filename, 'rates')['rates'] end |
#rates_creation_date ⇒ Object
19 20 21 22 |
# File 'lib/fixer_api_client/currency_data.rb', line 19 def rates_creation_date = parse(rates_filename, 'rates')['timestamp'] && Time.strptime(.to_s,'%s').utc.to_s end |
#symbols ⇒ Object
28 29 30 |
# File 'lib/fixer_api_client/currency_data.rb', line 28 def symbols @symbols ||= parse(currencies_filename, 'symbols')['symbols'] end |