Method: UnitMeasurements::UnitGroup#initialize
- Defined in:
- lib/unit_measurements/unit_group.rb
#initialize(primitive, units, cache_file) ⇒ UnitGroup
Initializes a new UnitGroup instance.
59 60 61 62 63 |
# File 'lib/unit_measurements/unit_group.rb', line 59 def initialize(primitive, units, cache_file) @units = units.map { |unit| unit.with(unit_group: self) } @primitive = unit_for!(primitive) if primitive @cache_file = cache_file end |