Measure::Weight::Unit
Inherits Enum < Comparable < Value < Object
The units available to Weight instances. Note that there are multiple
aliases of each one. This allows you to say weight.to(:pounds) or
weight.to(:kilograms).
Constants
Gram = 0
Grams = 0
G = 0
Kilogram = 1
Kilograms = 1
KG = 1
Milligram = 2
Milligrams = 2
MG = 2
Pound = 3
Pounds = 3
LB = 3
LBS = 3
Ounce = 4
Ounces = 4
OZ = 4
Ton = 5
Tons = 5
T = 5
Instance methods
Returns an unambiguous String representation of this enum member.
In the case of a single member value, this is the fully qualified name of
the member (equivalent to #to_s with the enum name as prefix).
In the case of multiple members (for a flags enum), it's a call to Enum.[]
for recreating the same value.
If the value can't be represented fully by named members, the remaining value is appended.
Color::Red # => Color:Red
IOMode::None # => IOMode::None
(IOMode::Read | IOMode::Write) # => IOMode[Read, Write]
Color.new(10) # => Color[10]