Sha256: 7154bc3f92efcc7e95b895efde8d6619a214194b7302814f07dc581143ac2f32

Contents?: true

Size: 485 Bytes

Versions: 48

Compression:

Stored size: 485 Bytes

Contents

module Quantified
  class Mass < Attribute
    system :metric do
      primitive :gram
      
      one :milligram, :is => Mass.new(0.001, :grams)
      one :kilogram, :is => Mass.new(1000, :grams)
    end
    
    system :imperial do
      primitive :ounce
      one :ounce, :is => Mass.new(28.349523125, :grams)
      
      one :pound, :is => Mass.new(16, :ounces)
      one :stone, :is => Mass.new(14, :pounds)
      one :short_ton, :is => Mass.new(2000, :pounds)
    end
  end
end

Version data entries

48 entries across 48 versions & 6 rubygems

Version Path
omniship-0.4.7 lib/vendor/quantified/lib/quantified/mass.rb
omniship-0.4.6 lib/vendor/quantified/lib/quantified/mass.rb
omniship-0.4.5 lib/vendor/quantified/lib/quantified/mass.rb
omniship-0.4.1 lib/vendor/quantified/lib/quantified/mass.rb
bcarpenter-active_shipping-0.0.2 lib/vendor/quantified/lib/quantified/mass.rb
bcarpenter-active_shipping-0.0.5 lib/vendor/quantified/lib/quantified/mass.rb
bcarpenter-active_shipping-0.0.6 lib/vendor/quantified/lib/quantified/mass.rb
bcarpenter-active_shipping-0.0.7 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.12.4 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.12.3 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.12.2 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.12.1 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.12.0 lib/vendor/quantified/lib/quantified/mass.rb
omniship-0.4.0 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.11.2 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.11.1 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.11.0 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.10.1 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.10.0 lib/vendor/quantified/lib/quantified/mass.rb
active_shipping-0.9.15 lib/vendor/quantified/lib/quantified/mass.rb