Skip to content
/ unite Public

Unite provides module extensions to your ruby objects for unit/value support.

License

Notifications You must be signed in to change notification settings

stellard/unite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Unite provides module extensions to your ruby objects for unit/value support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages