This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 985d49ae83ed79cebd2069d3203cbc96bce75388
tree da11694f9627494a1c88bfc02dd50da549707859
parent 1d0f1e907b2fe7429a2dfb92c009c9f7eb0b5b35
tree da11694f9627494a1c88bfc02dd50da549707859
parent 1d0f1e907b2fe7429a2dfb92c009c9f7eb0b5b35
| name | age | message | |
|---|---|---|---|
| |
LICENSE.txt | ||
| |
README.textile | ||
| |
Rakefile | Wed Jun 24 11:23:35 -0700 2009 | |
| |
lib/ | ||
| |
spec/ | Wed Jun 24 11:57:20 -0700 2009 |
README.textile
Enumeration
Between string and symbol array literals, hash literals, and constants in
modules or classes, Ruby users have plenty of options for enumeration
constructs. If you need more, try Enumeration.
irb> Melons = Enumeration.of :watermelon, :honeydew, :cantelope
irb> Melons::HONEYDEW
=> :honeydew
irb> Melons.enum
=> [:watermelon, :honeydew, :cantelope]
irb> Melons.to_s
=> ["watermelon", "honeydew", "cantelope"]
irb> Melons::Order
=> {:cantelope=>2, :watermelon=>0, :honeydew=>1}
You can also use an array of strings to construct an Enumeration:
irb> Colors = Enumeration.of %w{fuschia red bondi cerulean carnelian}
irb> Colors::BONDI
=> :bondi
Author:
- Karlin Fox
- Atomic Object
- http://atomicobject.com








