search for: set7_smthetc

Displaying 1 result from an estimated 1 matches for "set7_smthetc".

2007 Oct 19
1
Block iteration issues
...What I''m trying to achieve @collection has 7 elements I want to: - cycle through all those elements - assign element["smth"] through element["smth3"] to @data.set1_smth through @data.set1_smth3 - the last iteration would be assigning element["smth"] to @data.set7_smthetc I just don''t seem to grasp how to change @data.set1_smth into @ data.set2_smth etc. when iterating the block. i = 1 @collection.elements.each do |item| @data.set1_smth = item.elements["smth"] # obviously @ data.set1_smth should be somehow different @data.set1_...