Class: Stick::Units::LengthLoader
- Defined in:
- lib/stick/units/units.rb
Constant Summary collapse
- LENGTH_PREFIXES =
The prefixes used for length units. See also Converter#register_length_unit.
{ 'square_' => {:abbrev => 'sq_', :power => 2}, 'cubic_' => {:abbrev => 'cu_', :power => 3} }
Instance Method Summary collapse
Methods inherited from Loader
Instance Method Details
#length_unit(converter, name, args) ⇒ Object
50 51 52 |
# File 'lib/stick/units/units.rb', line 50 def length_unit(converter, name, args) converter.send(:register_prefixed_unit, name, LENGTH_PREFIXES, args) end |