Skip to content

Instantly share code, notes, and snippets.

@shadoi
Created August 8, 2011 04:24
Show Gist options
  • Save shadoi/1131204 to your computer and use it in GitHub Desktop.
Save shadoi/1131204 to your computer and use it in GitHub Desktop.
module A
def some_instance_method
"hi"
end
module ClassMethods
def foo
"asdf"
end
end
end
class Blah
include A
extend A::ClassMethods
end
$ Blah.new.some_instance_method
# => "hi"
$ Blah.foo
# => "asdf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment