Method: Comparison::Comparator#initialize
- Defined in:
- lib/comparison/comparator.rb
#initialize(value, other) ⇒ Comparator
Instantiates a new Comparator to compare two numbers, value and other.
Both numbers will be converted to instances of BigDecimal.
19 20 21 22 |
# File 'lib/comparison/comparator.rb', line 19 def initialize(value, other) @value = value.to_d @other = other.to_d end |