Sha256: 5693154ac300395aa1d3dbd88578c9d77cbea7c8f5242c28a18761ab0c6f2eea

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

Units.create :mass do |m|
  m.system :metric do |s|
    s.unit :name => :gram, :abbrev => :g, :greek => :ten
  end
end

Units.create :weight do |m|
  m.system :avoirdupois do |s|
    s.unit :name => :grain, :equals => (1/7000.0).lb, :abbrev => :gr
    s.unit :name => :dram, :equals => (1/16.0).oz, :abbrev => :dr
    s.unit :name => :ounce, :equals => (1/16.0).lb, :abbrev => :oz
    s.unit :name => :pound, :equals => 454.g, :abbrev => :lb
    s.unit :name => :hundredweight, :equals => 100.lb, :abbrev => :cwt
    s.unit :name => :ton, :equals => 20.cwt
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eymiha_units-0.1.0 lib/units/definitions/mass.rb
eymiha_units-1.0.0 lib/eymiha/units/definitions/mass.rb
eymiha_units-1.0.1 lib/eymiha/units/definitions/mass.rb