From: Sasa Date: 2007-07-20T19:00:04+09:00 Subject: enumeration with symbol name information Hello everybody... I have a beginne's question: I've created class for my numeric constants, it looks like: class MyClass NAME1 = 0 NAME2 = 1 NAME3 = 2 #etc... def self.to_s(something) case something when 0 "NAME1" when 1 "NAME2" when 2 "NAME3" #etc... end end end What is more elegant way to do this? Basically, I want to convert the numerical value to string representation (ideally via identifier name). Thanks in advance, Sasa