o = Object.new
def o.method_missing(m,*args)
puts "xxxxxxx #{m}"
end
p o.some_method
What is the underlying process of overriding a method?
o = Object.new
def o.method_missing(m,*args)
puts "xxxxxxx #{m}"
end
p o.some_method
What is the underlying process of overriding a method?
how does the new method know that I am calling a missing method
If a called method is not defined, it can tell that you are calling a missing method.
how does it print the output of the new method?
By executing the new defined method.
How is
some_method
considered as them
argument?
By design.