From: Jeremy Kemper Date: 2006-08-28T06:08:37+09:00 Subject: Re: Detecting when an object's instance variables are modified ------=_Part_34971_28795766.1156712913848 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 8/27/06, David Vallner wrote: > > It's probably best to have your objects trace changes by design. Modify > the Object class to have a #dirty? and #clean! method, and alias / > redefine the #attr_writer method to generate methods that will set the > dirty flag when used? This works if you .freeze the ivar returned by attr_reader to prevent in-place modification. jeremy ------=_Part_34971_28795766.1156712913848--