From: John Mettraux Date: 2007-02-26T10:49:58+09:00 Subject: Re: define an each iterator, etc. 2007/2/26, Guillaume Nargeot : > I would like to know if it's possible to define iterators like each for a > class you have written ? > Is it also possible to write methods that can have the following > behavior/usage: > > object.method do |var| > # something > end Hi, see http://www.rubycentral.com/book/tut_containers.html look for "blocks and iterators" Best regards, -- John Mettraux -///- http://jmettraux.openwfe.org