Money.sub-exclamation-mark
You're seeing just the function
sub-exclamation-mark, go back to Money module for more information.
Specs
Subtract one Money value struct from another and raise on error.
Returns either {:ok, money} or {:error, reason}.
Arguments
money_1andmoney_2are any validMoney.ttypes returned byMoney.new/2
Returns
a
Money.tstruct orraises an exception
Examples
iex> Money.sub! Money.new(:USD, 200), Money.new(:USD, 100)
#Money<:USD, 100>
Money.sub! Money.new(:USD, 200), Money.new(:CAD, 500)
** (ArgumentError) Cannot subtract monies with different currencies. Received :USD and :CAD.