Re: Ruby BuiltIn functions singleton_method_added
singleton_method_added( aFixnum ) -> nil
Invoked with a symbol id whenever a singleton method is added to a module or a class. The default implementation in Kernel ignores this, but subclasses may override the method to provide specialized functionality.
class Test
def Test.singleton_method_added(id)
puts "Added #{id.id2name} to Test"
end
def a() end
def Test.b() end
end
def Test.c() end produces:
Added singleton_method_added to Test
Added b to Test
Added c to Test
__________________ Shaalini.S Be the Best of Whatever you are... |