class Money
def with_currency(new_currency)
-
(self)
-
Parameters:
-
new_currency
(Currency, String, Symbol
) -- Currency of the new object.
def with_currency(new_currency) new_currency = Currency.wrap(new_currency) if !new_currency || currency == new_currency self else dup_with(currency: new_currency) end end