Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/ruby_units/array.rb
Instance Method Summary collapse
-
#to_unit(other = nil) ⇒ Unit
Construct a unit from an array.
Instance Method Details
#to_unit(other = nil) ⇒ Unit
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 |