Module: Measurements::Type

Defined in:
lib/measurements/type.rb

Constant Summary collapse

SOLID =

Measurement state for unit of type solid

"solid"
FLUID =

Measurement state for unit of type fluid

"fluid"
NEUTRAL =

Measurement state for unit that can be either a fluid or solid measure

"neutral"
BASE =

Measurement state for the unit that is not a cooking unit

"base"

Class Method Summary collapse

Class Method Details

.available_typesArray

Deprecated.

Use Measurements#available_types instead of this method because it's a more obvious method to use instead of diving down to the Type module.

Helper method to get what types are available

Returns:

  • (Array)

    an Array of types that are available



20
21
22
# File 'lib/measurements/type.rb', line 20

def available_types
    self.constants.map{|types| types.downcase.to_sym}
end