From: Trans Date: 2008-04-23T20:55:18+09:00 Subject: Re: Is possible to extend "attr_accessor" "attribue=" method? On Apr 23, 4:49 am, "Iņaki Baz Castillo" wrote: > Hi, I'd like to use an "attr_accessor" but when its attribute is > modified it should be executed more code than just an assignament. > I handle it in this way (not cool): > > class MyClass1 < Father > def self.attr_accessor(name) module_eval %{ > attr_reader :#{name} > > def #{name}= (value) > @#{name} = value > @modified = true > ...more code... > end } end > end T.