Created
January 31, 2013 15:27
-
-
Save anonymous/4683679 to your computer and use it in GitHub Desktop.
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
class Child | |
end | |
age = 12 | |
test_module = Module.new do | |
AGE = age | |
def say_hello | |
puts "Hello from module, I am #{AGE} years old" | |
end | |
end | |
Child.send :include, test_module | |
Child.new.say_hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment