Method: AUOM::Unit#assert_same_unit
- Defined in:
- lib/auom/unit.rb
#assert_same_unit(other) ⇒ self
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Assert units are the same
189 190 191 192 193 |
# File 'lib/auom/unit.rb', line 189 def assert_same_unit(other) fail ArgumentError, 'Incompatible units' unless same_unit?(other) self end |