Method: Unit#-
- Defined in:
- lib/unit/class.rb
#-(other) ⇒ Object
86 87 88 89 90 91 92 93 94 |
# File 'lib/unit/class.rb', line 86 def -(other) if Numeric === other other = coerce_numeric_compatible(other) a, b = self.normalize, other.normalize Unit.new(a.value - b.value, b.unit, system).in(self) else apply_through_coercion(other, __method__) end end |