# File lib/eymiha/units/units_hash.rb, line 97 def reduce puts "UnitsHash:reduce #{to_s}" if @@debug factor = 1.0 new_unit = UnitsHash.new each do |unit,power| puts " #{unit} #{power}" if @@debug factor *= unit.equals.numeric**power puts " #{factor}" if @@debug new_unit.merge!(unit.equals,power) end factor.unite new_unit end