Sha256: 7546959d4d5c5adba9b6b82724eaec9c773bd5e47a96bc60df65785f30c041c7

Contents?: true

Size: 264 Bytes

Versions: 7

Compression:

Stored size: 264 Bytes

Contents

require 'danconia'

Danconia.configure do |config|
  config.default_currency = 'ARS'
  config.default_exchange = Danconia::Exchanges::FixedRates.new(rates: {'USDARS' => 27.5, 'USDEUR' => 0.86})
end

puts Money(10, 'ARS').exchange_to('EUR').inspect # => 0.31273 EUR

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
danconia-0.2.8 examples/fixed_rates.rb
danconia-0.2.7 examples/fixed_rates.rb
danconia-0.2.6 examples/fixed_rates.rb
danconia-0.2.5 examples/fixed_rates.rb
danconia-0.2.4 examples/fixed_rates.rb
danconia-0.2.3 examples/fixed_rates.rb
danconia-0.2.2 examples/fixed_rates.rb