Method: Measurement::Unit#initialize
- Defined in:
- lib/measurement/unit.rb
#initialize(scale, *args) ⇒ Unit
Returns a new instance of Unit.
7 8 9 10 11 12 |
# File 'lib/measurement/unit.rb', line 7 def initialize(scale, *args) @options = args.last.is_a?(Hash) ? args.pop : {} @names = args @scale = scale @groups = [@options[:group]].flatten end |