module ActsAsLiving::EnumDefiner::ClassMethods

Public Instance Methods

stages_enum() click to toggle source
# File lib/acts_as_living/enum_definer.rb, line 13
def stages_enum
  stages = @stage_keys.map.with_index(&method(:to_enum_map)).to_h
  stages.merge(@death => @spread * -1)
end
to_enum_map(stage, index) click to toggle source
# File lib/acts_as_living/enum_definer.rb, line 18
def to_enum_map(stage, index)
  [stage, index * @spread]
end