Skip to content

Instantly share code, notes, and snippets.

@lukeredpath
Created August 5, 2010 15:59
Show Gist options
  • Select an option

  • Save lukeredpath/509940 to your computer and use it in GitHub Desktop.

Select an option

Save lukeredpath/509940 to your computer and use it in GitHub Desktop.
class TestClass
def do_something
puts "Doing something"
end
end
module TestModule
def do_something
super
puts "Doing something else"
end
end
test = TestClass.new
test.extend(TestModule)
test.do_something
# => "Doing something"
# => "Doing something else"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment