Sha256: 73d7b883c888294a8e7f884fde87e975c51727712a5449d7aa935b8df82449d1
Contents?: true
Size: 547 Bytes
Versions: 5
Compression:
Stored size: 547 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(0.0254, :metres) 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
5 entries across 5 versions & 2 rubygems