Calling to "super" should be part of your solution...
def method_missing(m, *args, &block)
if m.to_s =~ /^has_right_(.*)$/
... calls another method passing $1 parameter
else
super(m, *args, &block)
end
end
#i added this line:
alias_method :ar_method_missing, :method_missing
#and an else condition in my method_missing
def method_missing(m,*a,&block)
if m.to_s =~ /^has_right_(.*)$/
... calls another method passing $1 parameter
else
ar_method_missing(m,*a, &block)
end
end
This is ordinary object-oriented programming. If you override a method
and want to delegate to the parent just call super. That's what super
is for. Aliasing is an inappropriate solution to this.