From: Michael Neumann Date: 2003-11-22T23:44:56+09:00 Subject: Re: Method wrapper question (was "stereotyping (was ...)) On Sat, Nov 22, 2003 at 11:15:04PM +0900, Christoph wrote: > ts wrote: > ... > > Yes, and this is why I prefer this scheme to > > > > class A > > def a:pre > > end > > > > def a:pre > > end > > > > def a > > end > > end > > Agreed 100% - I see no reason for allowing several hooks > in the same class. I could see a reason. Imagine the following scenario (monitors): class A def a:pre # my own pre-wrapper end synchronize :a # defines a:pre and a:post def a # critical section end end The implementation of sychronize has to do ugly method aliasing stuff, and depending on the order you define your own a:pre (e.g. putting the synchronize before it), the monitor-code gets overwritten. Regards, Michael