RichardOnRails
5/3/2008 8:04:00 PM
Hi,
I defined and populated a 9x9 matrix (Array of Arrays) of strings, m
I defined an element-extractor:
class Array
def get(i,j)
line =self[i-1]
char = line[j-1]
end
end
To get the first element of the second row, I used the following,
which worked fine:
m.get(2,1)
I'd like to write merely m(2,1). How can I do that simply?
Thanks in Advance,
Richard