Closed mklemme closed 7 years ago
The documentation method for listing the keys doesn't work. v 1.2.3
> Measurement.names NoMethodError: undefined method `names' for Measurement:Class
Tested if the other method worked for defining a new unit (it does)
Measurement.define(:day) do |unit| unit.alias :days unit.convert_to(:week) { |value| value / 7.0 } unit.convert_to(:year) { |value| value / 365.0 } end => #<Measurement::Unit::Builder:0x007ffd36de9938 @unit=day> >
Tried Measurement::Unit.names and 💥 , it worked! This pr is to update the documentation.
Measurement::Unit.names
The documentation method for listing the keys doesn't work. v 1.2.3
Tested if the other method worked for defining a new unit (it does)
Tried
Measurement::Unit.names
and 💥 , it worked! This pr is to update the documentation.