|
Notes:
This is the initial beta release of 'ruby-units'. This gem will allow for simple, yet powerful conversion of units as well as permitting unit math.
This enables the following syntax.
(("1 mile".to_unit / "1 attoparsec/microfortnight".to_unit) >>
"hours").to_s # => "17.5242 h"
It also handles many types of conversions.
Unit("1 m") >> "mm" #=> 1000 mm
Unit("37 degC") >> "degF" #=> 98.6 degF
Install using
gem install ruby-units
Changes:
|