Rubenum

Rubenum allows you to create simple enumerations in Ruby.

Installation

You can install the Rubenum gem via gem install rubenum.

Usage

Create a new enumeration from an array of strings with Rubenum.new.
Only valid Ruby identifiers are accepted.
By default, every element will be capitalized in order to make valid Ruby constant identifiers.

Arguments

Example

    colors = Rubenum.new(%w[red orange green])
    puts colors::Orange   # => 2