Possible Duplicate:
Enums in Ruby
How do you declare something like
public enum fruit {
mango ("mango", 1),
banana ("banana", 2),
apple ("apple", 3)
private fruit(String name, int index) {
....
}
}
I would like to show the strings in the user interface, but would like to store the integers in the database.