Money.div-exclamation-mark
You're seeing just the function
div-exclamation-mark
, go back to Money module for more information.
Specs
div!(t(), Cldr.Math.number_or_decimal()) :: t() | none()
Divide a Money
value by a number and raise on error.
Arguments
money
is any validMoney.t
types returned byMoney.new/2
number
is an integer, float orDecimal.t
Returns
a
Money.t
struct orraises an exception
Examples
iex> Money.div!(Money.new(:USD, 200), 2)
#Money<:USD, 100>
iex> Money.div!(Money.new(:USD, 200), "xx")
** (ArgumentError) Cannot divide money by "xx"