Money::Constructors
Instance methods
bitcoin(cents, bank = nil)
Creates a new Money object of the given value, using the
Bitcoin cryptocurrency.
Money.bitcoin(100) # => Money(@amount=0.000001 @currency="BTC")
euro(cents, bank = nil)
Creates a new Money object of the given value, using the
Euro currency.
Money.euro(100) # => Money(@amount=1 @currency="EUR")
Creates a new Money object of value given in the unit of the given
currency.
Money.from_amount(23.45, "USD") # => Money(@amount=23.45 @currency="USD")
Money.from_amount(23.45, "JPY") # => Money(@amount=23 @currency="JPY")
See #initialize.
us_dollar(cents, bank = nil)
Creates a new Money object of the given value, using the
American dollar currency.
Money.us_dollar(100) # => Money(@amount=1 @currency="USD")