From: Wilson Bilkovich Date: 2007-09-15T06:54:26+09:00 Subject: Re: define method hook On 9/14/07, Ben Burkert wrote: > Is there a way to intercept method defines, so that i can setup a > callback whenever a new method is defined for a class? I'm looking > for something that works with the def keyword, and doesn't require > any extensions. > Yep. Module#method_added If you do this: class Example def self.method_added(meth) p meth end end After that, this code: class Example;def foo(baz);5;end;end ..will print out: :foo