module Renum
def enum type_name, values = :defined_in_block, &block
-
block
() -- can be used to specify values with method calls, instance methods
-
values
(optional, Array
) -- -
type_name
(Symbol
) -- The name of the EnumeratedType class to create
def enum type_name, values = :defined_in_block, &block nest = self.is_a?(Module) ? self : Object EnumeratedValueTypeFactory.create(nest, type_name, values, &block) end