Module: BigMoney::Exchangeable
- Included in:
- BigMoney
- Defined in:
- lib/big_money/exchange.rb
Overview
Synopsis
require 'big_money'
require 'big_money/exchange/yahoo' # Use yahoo finance exchange service.
bm = BigMoney.new('3.99', :usd)
bm.amount #=> BigDecimal.new('3.99')
bm.currency #=> BigMoney::Currency::USD
bm2 = bm.exchange(:aud)
bm.amount #=> BigDecimal.new('5.22')
bm.currency #=> BigMoney::Currency::AUD
Instance Method Summary collapse
-
#exchange(to) ⇒ Object
Exchange to a new Currency.