Created
August 4, 2012 13:12
-
-
Save cupakromer/3257656 to your computer and use it in GitHub Desktop.
Steel City Ruby Lightning Talk
This file contains 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 steelcityruby | |
"I heard you like programming." | |
end |
This file contains 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 Meta | |
def just_programming | |
class_eval do | |
def steelcityruby | |
"I heard you like programming." | |
end | |
end | |
end | |
end | |
class Foo | |
extend Meta | |
just_programming | |
end | |
Foo.new.steelcityruby | |
=> "I heard you like programming." |
This file contains 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 just_programming | |
class_eval do | |
def steelcityruby | |
"I heard you like programming." | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment