From: Harry Ohlsen Date: 2002-08-04T21:03:21+09:00 Subject: Detecting when an instance variable is created/set Imagine we have a class like ... class Fred def initialize(a, b) @a = a @b = b end end Can I write a method (of class Object or Kernel, perhaps) that will be called when the "@a = a" occurs? What I'm looking for would be something like ... def instance_var_created(c, name, value) $stderr.puts "@#{name} of class #{c.class} set to #{value}" end Is this possible?