Project

unite

0.0
No commit activity in last 3 years
No release in over 3 years
Unite provides extensions to your objects to support values with units
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 3.0.0
 Project Readme

Install

With Bundler

gem 'unite'

Without Bundler

gem install unite

It's Science

It's Science

Based on the algorithms developed by Gordon S. Novak, Jr. at the University of Texas, which can be found here:

http://www.cs.utexas.edu/users/novak/units95.html

Dimensions

Handles the following dimensions:

[:length, :time, :temperature, :mass, :current, :substance, :luminosity]

Can use Unite::Quantity to represent values or include the functionality into your own objects.

Look at https://github.com/stellard/unite/blob/master/lib/unite/quantity.rb for a minum implementation

Examples:

TODO: Needs more info here.

Unite::Quantity.init("1000*km")
Unite::Quantity.init("1000","km")

Unit definitions are found here:

https://github.com/stellard/unite/blob/master/lib/unite/lookup/definitions.rb

Specs show good examples of use.