Skip to content

Instantly share code, notes, and snippets.

@yurivm
Created June 4, 2012 09:25
Show Gist options
  • Select an option

  • Save yurivm/2867415 to your computer and use it in GitHub Desktop.

Select an option

Save yurivm/2867415 to your computer and use it in GitHub Desktop.
WhinyMonday module
module WhinyMonday
def included(mod)
mod.instance_methods.each {|m| mod.send(:remove_method,m)}
end
def method_missing(symbol, *args)
puts "On Monday, I don't #{symbol}"
end
end
# and then
class MyClass
include WhinyMonday
end
MyClass.new.some_method
#:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment