Method: Unity::Arithmetic#+
- Defined in:
- lib/unity/arithmetic.rb
#+(other) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/unity/arithmetic.rb', line 16 def + other other = ensure_not_numeric other self.compatible! other other = other.convert_to(self) self.class.new(:value => (self.value + other.value), :numerator => self.numerator, :denominator => self.denominator) end |