On Thursday, February 13, 2003, at 07:50 PM, Brian wrote: > I have to memorize a lot of stuff, so I've been thinking about how to > make a tool that'll make me answer questions based on little quiz > databases I make. > > I was thinking about something like this: > atomic number:name:symbol:family > 1:hydrogen:H:nm > 2:helium:He:nm > > [snip] Why not consider the Struct class (a built-in class with attributes only)? You initialize with: ChemistryQuiz = Struct.new("ChemistryQuiz", :atomic_number, :name, :symbol, :family) and then initialize classes for each entry like so: ChemistryQuiz.new("1", "hydrogen", "H", "nm") etc. Struct mixes in Enumerable methods, which should let you traverse easily. See the reference in the pickaxe book or pages 268-269 in The Ruby Way. Please let me know what you end up doing.