class Money

Public Instance Methods

exchange_to_historical(other_currency, datetime, &rounding_method) click to toggle source

Exchanges to other_currency using datetime's closing rates and returns a new Money object. rounding_method is ignored in this version of the gem.

Parameters

  • other_currency - The currency to exchange to. Accepts ISO String and Money::Currency objects.

  • datetime - The Date to get the exchange rate from. If Time is passed instead, it's converted to the UTC Date.

  • rounding_method - This parameter is ignored in this version of the gem.

# File lib/money/bank/historical.rb, line 342
def exchange_to_historical(other_currency, datetime, &rounding_method)
  Bank::Historical.instance.exchange_with_historical(self, other_currency,
                                                     datetime, &rounding_method)
end