lib/ruby-measurement/unit.rb in ruby-measurement-1.2.0 vs lib/ruby-measurement/unit.rb in ruby-measurement-1.2.1

- old
+ new

@@ -54,9 +54,13 @@ def self.[](unit_name) @definitions[unit_name.to_s.downcase] end + def self.names + @definitions.keys + end + private def self.[]=(unit_name, unit) @definitions[unit_name.to_s.downcase] = unit end