Skip to content

Instantly share code, notes, and snippets.

Created January 31, 2013 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/4683679 to your computer and use it in GitHub Desktop.
Save anonymous/4683679 to your computer and use it in GitHub Desktop.
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