Class: Array
Instance Method Summary collapse
-
#to_unit(other = nil) ⇒ Unit
(also: #unit, #u)
Construct a unit from an array.
Instance Method Details
#to_unit(other = nil) ⇒ Unit Also known as: unit, u
Construct a unit from an array
6 7 8 |
# File 'lib/ruby_units/array.rb', line 6 def to_unit(other = nil) other ? RubyUnits::Unit.new(self).convert_to(other) : RubyUnits::Unit.new(self) end |