Money.compare-exclamation-mark
You're seeing just the function
compare-exclamation-mark
, go back to Money module for more information.
Compares two Money
values numerically and raises on error.
Arguments
money_1
andmoney_2
are any validMoney.t
types returned byMoney.new/2
Returns
:gt
|:eq
|:lt
orraises an exception
Examples
Money.compare! Money.new(:USD, 200), Money.new(:CAD, 500)
** (ArgumentError) Cannot compare monies with different currencies. Received :USD and :CAD.