What is the proper way of creating and adding elements to an array of array of hashes?
Here's something similar to what I want, initializing the result variable:
col1.each_with_index do |ob1,index1|
col2.each_with_index do |ob2,index2|
col3.each do |ob3|
result[index1][index2][ob3.id] = Obj.new(ob1.att, ob2.att, ob3.att)
end
end
end
I should be able to access result like:
result[1][2][1031]
where 1031 is an id, and the others are indexes from 0..n. It should return an instance of Obj.