Method: Money::Arithmetic#==
- Defined in:
- lib/money/money/arithmetic.rb
#==(other) ⇒ Object
Uses Comparable’s implementation but raises ArgumentError if non-zero numeric value is given.
83 84 85 86 87 88 |
# File 'lib/money/money/arithmetic.rb', line 83 def ==(other) if other.is_a?(Numeric) && !other.zero? raise ArgumentError, 'Money#== supports only zero numerics' end super end |