lib/classy_enum/base.rb
# Used internally to build a new ClassyEnum child instance
# It is preferred that you use ChildClass.new instead
#
# ==== Example
#  # Create an Enum with some elements
#  class Priority < ClassyEnum::Base
#  end
#
#  class Priority::Low < Priority
#  end
#
#  Priority.build(:low) # => Priority::Low.new
#  Priority.build(:invalid_option) # => :invalid_option
Used internally to build a new ClassyEnum child instance
It is preferred that you use ChildClass.new instead

Example
Create an Enum with some elements
class Priority < ClassyEnum::Base
end

class Priority::Low < Priority
end


Used internally to build a new ClassyEnum child instance It is preferred that you use ChildClass . new instead Example Create an Enum with some elements class Priority < ClassyEnum :: Base end class Priority :: Low < Priority end
def build(value, options={})
        object = find(value)
        if object.nil?
          value
        else
          object.owner = options[:owner]
          object
        end
      end
def build ( value , options = { } ) object = find ( value ) if object . nil? value else object . owner = options [ :owner ] object end end
Used internally to build a new ClassyEnum child instance
It is preferred that you use ChildClass.new instead
Used internally to build a new ClassyEnum child instance It is preferred that you use ChildClass . new instead
value
<not_specific>
options
<not_specific>