Created
December 11, 2013 08:00
-
-
Save leemour/7906611 to your computer and use it in GitHub Desktop.
Define method in ruby
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
def method_missing(m) | |
self.class.class_exec do | |
define_method(:screech) {puts "This is the new screech."} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment