Module: CurrencyExchange
- Defined in:
- lib/currency_exchange.rb,
lib/currency_exchange/version.rb,
lib/currency_exchange/storage/cache.rb,
lib/currency_exchange/data/currencies.rb,
lib/currency_exchange/storage/rails_cache.rb,
lib/currency_exchange/exchangers/open_exchange.rb,
lib/currency_exchange/transporters/json_transporter.rb,
lib/currency_exchange/transporters/exchange_transporter.rb
Defined Under Namespace
Modules: Data, Exchangers, Storage, Transporters
Constant Summary
collapse
- VERSION =
"0.0.5"
Class Method Summary
collapse
Class Method Details
.convert(number, from, to) ⇒ Object
24
25
26
|
# File 'lib/currency_exchange.rb', line 24
def convert(number, from, to)
exchanger.convert(number, from, to) if has_currency?(from, to)
end
|
.has_currency?(from, to) ⇒ Boolean