lib/quantify/unit/base_unit.rb
# List the alternative units for self, i.e. the other units which share
# the same dimensions.
#
# The list can be returned containing the alternative unit names, symbols
# or JScience labels by providing the required format as a symbolized
# argument.
#
# If no format is provide, the full unit objects for all alternative units
# are returned within the array
#
List the alternative units for self, i.e. the other units which share
the same dimensions.

The list can be returned containing the alternative unit names, symbols
or JScience labels by providing the required format as a symbolized
argument.

If no format is provide, the full unit objects for all alternative units
are returned within the array
List the alternative units for self i . e . the other units which share the same dimensions . The list can be returned containing the alternative unit names symbols or JScience labels by providing the required format as a symbolized argument . If no format is provide the full unit objects for all alternative units are returned within the array
def alternatives(by=nil)
        @dimensions.units(nil).reject do |unit|
          unit.is_equivalent_to?(self) || !unit.acts_as_alternative_unit
        end.map(&by).to_a
      end
def alternatives ( by = nil ) @dimensions . units ( nil ) . reject do | unit | unit . is_equivalent_to? ( self ) || ! unit . acts_as_alternative_unit end . map ( & by ) . to_a end
List the alternative units for self, i.e.
List the alternative units for self i . e .
by
<not_specific>