Skip to content

Instantly share code, notes, and snippets.

@swanandp
Created April 14, 2014 12:29
Show Gist options
  • Save swanandp/10643437 to your computer and use it in GitHub Desktop.
Save swanandp/10643437 to your computer and use it in GitHub Desktop.
module HookMethodMissing
def method_missing(name, *args, &block)
puts name
super
end
end
class A
extend HookMethodMissing
end
A.foo
# xyz
# NoMethodError: undefined method `xyz' for A:Class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment