Module: FixerApiClient

Defined in:
lib/fixer_api_client.rb,
lib/fixer_api_client/version.rb,
lib/fixer_api_client/currency.rb,
lib/fixer_api_client/connection.rb,
lib/fixer_api_client/currency_data.rb

Defined Under Namespace

Classes: Connection, Currency, CurrencyData, Error

Constant Summary collapse

VERSION =
"0.1.2"

Class Method Summary collapse

Class Method Details

.available_conversionsObject



6
7
8
9
10
# File 'lib/fixer_api_client.rb', line 6

def self.available_conversions
  FixerApiClient::CurrencyData.symbols.map do |symbol, _|
    "to_#{symbol.downcase}"
  end
end

.available_currenciesObject



12
13
14
15
16
# File 'lib/fixer_api_client.rb', line 12

def self.available_currencies
  FixerApiClient::CurrencyData.symbols.map do |symbol, friendly_name|
    "#{symbol.downcase}: #{friendly_name}"
  end
end

.rates_creation_dateObject



18
19
20
# File 'lib/fixer_api_client.rb', line 18

def self.rates_creation_date
  FixerApiClient::CurrencyData.rates_creation_date
end