From: John Joyce Date: 2007-04-10T00:00:29+09:00 Subject: Re: code blocks and methods Ruby blocks are generally far simpler than they seem at first. On Apr 9, 2007, at 10:57 PM, Rick DeNatale wrote: > On 4/9/07, DDENNISON@up.com wrote: >> I like to think of code blocks as a visitor pattern or a callback >> function. >> You are essentially passing in a chunk of code to a method to be >> executed >> for each logical element of data. > > That's more a description of how they are used in iterator methods > rather than a general description of code blocks and the variety of > ways they can be used. > > -- > Rick DeNatale > > My blog on Ruby > http://talklikeaduck.denhaven2.com/ >