Berger, Daniel
3/30/2005 7:42:00 PM
> -----Original Message-----
> From: Eric Hodel [mailto:drbrain@segment7.net]
> Sent: Wednesday, March 30, 2005 12:38 PM
> To: ruby-talk ML
> Subject: Re: Syntax sugar idea for loops
>
> people.each_with_index do |person, i|
> puts "First person: #{person} if person == people.first
> row_class = i.even? ? "row1" : "row2"
> puts "Last person: #{person} if person == people.last
> end
>
> How about that?
That'll work, too. :)
Dan