lib/da_money/money.rb
def convert_to(target_currency)
      raise Exception.new("'target_currency' must be different from the current currency!") \
        if target_currency == self.currency
      result = self.amount * conversion_rate(target_currency)
      DaMoney::Money.new(result, target_currency)
    end
# Converts a DaMoney::Money object into a different currency.
#
# @return [DaMoney::Money]
Converts a DaMoney::Money object into a different currency.
Converts a DaMoney :: Money object into a different currency .
def convert_to(target_currency)
      raise Exception.new("'target_currency' must be different from the current currency!") \
        if target_currency == self.currency
      result = self.amount * conversion_rate(target_currency)
      DaMoney::Money.new(result, target_currency)
    end
def convert_to ( target_currency ) raise Exception . new ( "'target_currency' must be different from the current currency!" ) if target_currency == self . currency result = self . amount * conversion_rate ( target_currency ) DaMoney :: Money . new ( result , target_currency ) end
Converts a DaMoney::Money object into a different currency.
Converts a DaMoney :: Money object into a different currency .
None
DaMoney::Money
target_currency