Currency Exchange Plugin in Ruby on rails
This Plugin converts an amount of money from one currency to another. You can convert from and to any of the following currencies:
EUR, USD, JPY, BGN, CZK, DKK, EEK, GBP, HUF, LTL, LVL, PLN, RON, SEK, SKK, CHF, ISK, NOK, HRK, RUB, TRY, AUD, BRL, CAD, CNY, HKD, IDR, KRW, MXN, MYR, NZD, PHP, SGD, THB, ZAR
IMPORTANT NOTES:
As you should not work with fractions when handling money, the converter expects you to pass it amount of money in its smallest unit. The result will be returned as an integer.
–The plugin uses the exchange rates published by the European Bank. – The exchange rates are updated automatically once a day on demand.
INSTALLATION:
ruby script/plugin install git://github.com/jasonfranklin-stokes/currencyexchange.git
USAGE EXAMPLE:
converted_money=CurrencyExchange.currency_exchange(100, “USD”, “EUR”)
You can be online or offline using this plugin. If you are offline while using the plugin for the first time, it will fall back on to an internal .xml file with old exchange rates.
As soon as it is online, and has the current exchange rates it will only update them once a day directly from the European Bank.
Should you go offline after that it will use the last exchange rates it received.
Related Posts
Tags: currency convertor, exchange rates, plugin, ruby on rails
Viewed: 722 views
