I'm trying to get a callback when any method on a particular class is called. Overriding "send" doesn't work. It seems send doesn't get called in normal Ruby method invocation. Take the following example.
class Test
def self.items
@items ||= []
end
end
If we override send on Test, and then call Test.items, send doesn't get called.
Is what I'm trying to do possible?
I'd rather not use set_trace_func, since it'll probably slow down things considerably.