From: Mariano Kamp Date: 2006-10-04T14:33:45+09:00 Subject: Re: Using Each to Iterate Hi Jeff, On Oct 4, 2006, at 1:05 AM, Jeff Nyman wrote: > 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 > Then the information printed after the 2nd comma is the filter and you could instead write in your block: "puts step.filter". No String manipulation needed. Have fun. Cheers Mariano