Class: CurrencyExchange::Data::Currencies

Inherits:
Object
  • Object
show all
Defined in:
lib/currency_exchange/data/currencies.rb

Class Method Summary collapse

Class Method Details

.has_currency?(from, to) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/currency_exchange/data/currencies.rb', line 5

def self.has_currency?(from, to)
  return false unless from && to
  CURRENCIES.has_key?(from.upcase) && CURRENCIES.has_key?(to.upcase)
end