Money.mult-exclamation-mark

You're seeing just the function mult-exclamation-mark, go back to Money module for more information.

Specs

mult!(t(), Cldr.Math.number_or_decimal()) :: t() | none()

Multiply a Money value by a number and raise on error.

Arguments

  • money is any valid Money.t types returned by Money.new/2

  • number is an integer, float or Decimal.t

Returns

  • a Money.t or

  • raises an exception

Examples

iex> Money.mult!(Money.new(:USD, 200), 2)
#Money<:USD, 400>

Money.mult!(Money.new(:USD, 200), :invalid)
** (ArgumentError) Cannot multiply money by :invalid