Skip to content

Instantly share code, notes, and snippets.

@swanandp
Created August 27, 2009 09:41
Show Gist options
  • Save swanandp/176199 to your computer and use it in GitHub Desktop.
Save swanandp/176199 to your computer and use it in GitHub Desktop.
module M
def test
puts "test"
end
end
class X
include M
def test
puts "instance"
super
end
end
class Y
extend M
def self.test
puts "class"
super
end
end
X.new.test
X.test
Y.new.test
Y.test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment