Skip to content

Instantly share code, notes, and snippets.

@newtonapple
Created September 25, 2008 21:53
Show Gist options
  • Save newtonapple/12952 to your computer and use it in GitHub Desktop.
Save newtonapple/12952 to your computer and use it in GitHub Desktop.
module M
module ClassMethods
def foo
bar
end
private
def bar
'bar'
end
end
end
class C
extend M::ClassMethods
end
module M
module ClassMethods
def foo
self.bar
end
private
def bar
'bar'
end
end
end
class C
extend M::ClassMethods
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment