From: roktas Date: 2002-02-24T06:05:25+09:00 Subject: Newbie question Hi all, How can I create an array of array with some funny (!) properties? To make clear, here is the exact problem: I have a tab seperated text file which the first line points to the field labels, that is; field1\tfield2\tfield3 foo\tbar\tgoo .. I have created a 'DB' class which holds the whole data (after some parsing). What I want to realize is something that results with the following simple calls in the main block: db = DB.new("file.txt") p db[3]["field2"] I have some experimental codes but don't include them to prevent messing around. Inside a 'Record' class (inherited from Array), I have played with [] method to take a string argument (like "field2" as shown above) and used this class as the line container in a base array, but can't succeed :( This is my first attemp to learn Ruby's OOP features, but perhaps, as a first try, I could choose another problem :) Thanks in advance for your replies and sorry for my poor English. Regards. -- roktas