Class: Numeric
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/ruby_units/numeric.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#to_unit(other = nil) ⇒ Unit
make a unitless unit with a given scalar.
Instance Method Details
#to_unit(other = nil) ⇒ Unit
make a unitless unit with a given scalar
4 5 6 |
# File 'lib/ruby_units/numeric.rb', line 4 def to_unit(other = nil) other ? RubyUnits::Unit.new(self, other) : RubyUnits::Unit.new(self) end |