From: "Iñaki Baz Castillo" Date: 2008-04-23T17:49:52+09:00 Subject: Is possible to extend "attr_accessor" "attribue=" method? 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 attr_reader :my_param def my_param= (value) @my_param = value @modified = true ...more code... end end As you see I can't use "attr_accessor :my_param" since if I use it I should also redefine "my_param=" method. I have lots of MyClassX classes inheriting from "Father" and I'want @modified to be an attribute of Father and each soon class has its own attributes, and when any attribute is modified I want @modified to become true, so I'm looking for something as: class Father # Attributes: @modified (false by default) def **any_attribute**= (value) @**ny_attribute** = value @modified = true end end class MyClass1 < Father attr_accessor :my_param1, :my_param2 end Is it possible in saome way? mybe using "no_method_name" method? -- Iñaki Baz Castillo