Hi,
suppose I have following class:
class Foo
def initialize(n=0)
@n = n
end
def show
p "show(Foo): #{n}"
end
def method_missing(mid, *args)
p "#{mid.is2name} catched"
end
end
and I have defined:
foo = Foo.new(12)
and now I want to call:
foo.blarb
This call will results in a `foo.method_missing(:blarb)', right?
Now I want to know, whether there is a possibility to catch `foo.show'
within `Foo'? Is there some mechanism like:
foo.show
will results in `foo.__send__(:show)', so that I could redefine
`Foo#__send__' and therefore capture all method calls to `foo'?
Like `method_missing' but called in every case. Regardless if `blarb'
exists or not?
If there is not such a mechanism, could we get such easily?
\cle