From: David Alan Black Date: 2002-08-05T06:45:25+09:00 Subject: Re: Detecting when an instance variable is created/set Hi -- On Mon, 5 Aug 2002, Massimiliano Mirra wrote: > On Mon, Aug 05, 2002 at 04:59:40AM +0900, Harry Ohlsen wrote: > > > Would it be enough for you to catch creation of instance variables in > > > each method before it returns, to do what you want with them > > > (e.g. swapping their value with a wrapper of the value)? > > > > Unfortunately, for it to be useful to me, I'd specifically need it to work in > > initialize() as well. > > I don't know why it does not work in initialize (I assumed it would). It's because initialize is a private method, so it doesn't appear in your klass.instance_methods call. David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav