From: Rick DeNatale Date: 2007-09-06T01:24:41+09:00 Subject: Re: python-style decorators On 8/7/07, Keith Rarick wrote: > One notable difference between the public, private, protected notation > and these decorators is that these must appear immediately before each > method they should apply to. A decorator's effects don't stick around > beyond the very next method, so there's no danger of having it go > unnoticed further down the file. Hmmmm, I'm just catching up after being too busy for a few weeks to drink from the firehose that is ruby-talk. I just wrote this yesterday: http://talklikeaduck.denhaven2.com/articles/2007/09/04/block-your-privates After noticing that some folks like ot artifically indent methods definitions after private and its friends, it occurred to me that it might be nice if you could write class Foo private do def method1 end def method2 end end ... end I ran into similar issues in trying to metahack an implementation of this idea, although I did find a way to accomplish the same effect albeit with somewhat less pretty code, see the article for the details. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/