Looking for ruby Answers? Try Ask4KnowledgeBase
Looking for ruby Keywords? Try Ask4Keywords

Ruby Language Catching calls to an undefined method


Example

class Animal
  def method_missing(method, *args, &block)
    "Cannot call #{method} on Animal"
  end
end

=> Animal.new.say_moo 
> "Cannot call say_moo on Animal"