From: Markus Werner Date: 2004-12-31T00:12:35+09:00 Subject: Re: attr / attr_accessor On Thursday 30 December 2004 15:41, gabriele renzi wrote: Hi, > Henrik Ronellenfitsch ha scritto: > > If you write these methods yourself instead of using the > > attr_-construct, you can do whatever you want in the methods and it > > still looks the same to everyone who uses your class. Hmmm... don't got your mail yet. > > I /think/ he knew this and was looking for a way to define a bunch of > attributes with a common behaviour, say, You right. > > class Foo > attr_with_logging :foo > end > Foo.new.foo=10 #Foo::Logger.log "changed foo in instance 123456" For example I playing around with vapor.rubyforge.org and you need to call the methode object.mark_dirty everytime you write to the attribute. But I see it's not to hard to implement althoug I'm not able to understand your code, for now. But I will... regards Markus