Sha256: 24521adef822645cf84ce376e2cccb90105ec2d58673736456495d6bcb9b8bc6
Contents?: true
Size: 566 Bytes
Versions: 48
Compression:
Stored size: 566 Bytes
Contents
module Quantified class Length < Attribute system :metric do primitive :metre one :centimetre, :is => Length.new(0.01, :metres) one :millimetre, :is => Length.new(0.1, :centimetres) one :kilometre, :is => Length.new(1000, :metres) end system :imperial do primitive :inch one :inch, :is => Length.new(2.540, :centimetres) one :foot, :plural => :feet, :is => Length.new(12, :inches) one :yard, :is => Length.new(3, :feet) one :mile, :is => Length.new(5280, :feet) end end end
Version data entries
48 entries across 48 versions & 6 rubygems