NBU Rates

Gem for fetching currency from National bank of Ukraine

Gem done by this tutorial from GoodProgrammer

Installation

Add this line to your application's Gemfile:

gem 'nbu_rates'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install nbu_rates

Usage

require 'cbr_rates'

usd = Money.new('1_50', 'USD')

result = CbrRates.new.exchange(usd, 'CAD')

puts "1.50 USD ~> CAD: #{result.format}"

How to work with object Money: documentation

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Dmytrenko-I/nbu_rates.

License

The gem is available as open source under the terms of the MIT License.