Created
June 4, 2012 09:25
-
-
Save yurivm/2867415 to your computer and use it in GitHub Desktop.
WhinyMonday module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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