Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Enumerate over your contant values.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
README
Rakefile
enumerable_constants.gemspec

README

# Enumerable Contstants

This gem can be used for situations where enumerating over constant values is desired.
This facilitates keeping the code DRY by keeping the constant values defined in one place, and
still having the ability to enumerate over their values wherever they are needed.

## Example use cases

* defining constants for possible field values in an AR object while using the values in a
  `validates_inclusion_of` validation
* defining constants for select box values in a view helper and using this gem to allow them to be
  enumerated over in the select tag
Something went wrong with that request. Please try again.