I need a callback for variable assignment; instance variable assignment is the most important, but others would be an even greater plus. I was searching for a solution and stumbled across this, apparently from some past Ruby Talk thread from before my time here. I was wondering if any of the potential variable assignment callbacks besides global scope have been fulfilled? Anybody know?
POTENTIAL ACTUAL
Class creation Class#inherited, AClass#new
Class reopening/closing
Module creation
Module reopening/closing
Method definition Module#method_added
Method removal Module#method_removed
Method undef Module#method_undefined
Singleton-Method definition Object#singleton_method_added
Singleton-method deletion Object#singelton_method_removed
Singleton-method undef Object#singelton_method_undefined
Constant assignment*
Global variable assignment Kernel#trace_var**
Class variable assignment
Instance variable assignment
Local variable assignment
Module inclusion Module::included, Module#append_features
Module extension Module::extended, Module#extend_object
Missing Method Object#method_missing
Missing Constant Module#const_missing
Object Destruction ObjectSpace#*_finalizer
Program Termination Kernel#at_exit
* Constant assignment may encompass class and module creation (?)
** Actually a trace rather then a callback
++ set_trace_func is not included, it is a separate "universal" catch-all
- Jake McArthur