T
trans. (T. Onoma)
I'm wondering how feasible it might be to implement a local_method_missing
hook in core Ruby? What I mean by that is a hook like method_missing, but one
that only is concerned with the methods defined in the current class context.
E.g.
class A
def a; end
end
class B < A
def local_method_missing(sym, *args)
puts "Can't find #{sym}."
end
end
B.new.a
#=> Can't find a.
Thanks,
T.
hook in core Ruby? What I mean by that is a hook like method_missing, but one
that only is concerned with the methods defined in the current class context.
E.g.
class A
def a; end
end
class B < A
def local_method_missing(sym, *args)
puts "Can't find #{sym}."
end
end
B.new.a
#=> Can't find a.
Thanks,
T.