Class: Money::Arithmetic::CoercedNumeric
- Inherits:
-
Struct
- Object
- Struct
- Money::Arithmetic::CoercedNumeric
- Defined in:
- lib/money/money/arithmetic.rb
Overview
Wrapper for coerced numeric values to distinguish when numeric was on the 1st place in operation.
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#zero? ⇒ Boolean
Proxy #zero? method to skip unnecessary typecasts.
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value
5 6 7 |
# File 'lib/money/money/arithmetic.rb', line 5 def value @value end |
Instance Method Details
#zero? ⇒ Boolean
Proxy #zero? method to skip unnecessary typecasts. See #- and #+.
7 8 9 |
# File 'lib/money/money/arithmetic.rb', line 7 def zero? value.zero? end |