From: Jeff Nyman Date: 2006-10-04T03:20:16+09:00 Subject: Re: Using Each to Iterate "Mariano Kamp" wrote in message news:F4F2C675-A916-469A-A4D8-228930FB2BDB@acm.org... > I have the feeling that you didn't figure it out completely yet. You are correct, as it turns out. :) I did need the find_all. What's interesting is I find that I can do the following: (1) Have my selection method in the StepList class look like this: def selection @guides.find_all { |guide| guide } end (2) Have my 'each' method in the Step class look like this: def each end (3) Cycle through the elements like this: $stepList.selection.each { |thisStep| puts thisStep } If I run that above code (from (3)), I get this: Step Guide: 202G_OrdAdd, 203G_OrdUpdate, first after 202G_OrdAdd|203G_OrdUpdateFirst Step Guide: 202G_OrdAdd, 203G_OrdUpdate, last|203G_OrdUpdateLast Step Guide: 203G_OrdUpdate, 203G_OrdUpdate, last|203G_OrdUpdateLast Here the last part (after the second comma) is actually the filter part I want. With this, however, I can at least parse the string and get to that. I should note that to get the above output, it was necessary to have a to_s method in the Step class. Otherwise, I would get this when the 'selection.each' was run: # # # I think what was (perhaps still is) throwing me off is that I have an object (Step) being stored within another object (StepList). - Jeff