Class: OandaBank

Inherits:
Money::Bank::Base
  • Object
show all
Defined in:
lib/oanda_exchange/oanda_bank.rb

Instance Method Summary collapse

Instance Method Details

#exchange_with(from, to_currency) ⇒ Object



5
6
7
# File 'lib/oanda_exchange/oanda_bank.rb', line 5

def exchange_with(from, to_currency)
  Money.new(Oanda.exchange(from.currency.to_s, :to => to_currency.to_s, :amount => from) * 100, to_currency.to_s)
end