Skip to content

solnic/virtus-units

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtus Units

This is a set of custom virtus attributes that use ruby-units to convert between different units of measure.

The project is currently only a code spike, a proof of concept. We'll see how it goes.

API

It can look more or less like this:

class WaterPool
  include Virtus

  attribute :capacity, Volume, :input_unit => :gallon, :output_unit => :liter
end

water_pool = WaterPool.new(:capacity => 10000)
water_pool.capacity # 37854.118

About

ABANDONED - MOVE ON

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages