From: Jeff Nyman Date: 2006-10-04T08:05:10+09:00 Subject: Re: Using Each to Iterate "Mariano Kamp" wrote in message news:1E89B6F6-AA68-4E62-9D79-F2A4473E0D16@acm.org... > Uuh. Don't do that. > I looked at your code again, but didn't find the part where you add the > elements. > > I guess you call this method: > > def append(thisGuide) > @guides.push(thisGuide) > self > end > > But what do you add? I would assume an instance of Step? Correct. Basically, I do this when adding to the list: $stepList.append(Step.new(firstStep, thisStep, thisFilter)) Here 'firstStep', 'thisStep' and 'thisFilter' are just text values that are read in from an XML file. (Incidentally, most of this is copied largely from the Pickaxe book. I hijacked the examples of Song and SongList since they seemed fairly close to what I needed to do.) > Yeah, maybe. In this particular case I would like to see the to_s method > what the information after the 2nd comma is. The 'to_s' method I have in the Step class looks like this: class Step ... def to_s if (@filter != nil && @filter != "") "#@point1, #@point2, #@filter" else "#@point1, #@point2" end end end So it's nothing really fancy. Beyond this, I will try the suggestions you bring up here. - Jeff