Created
July 14, 2011 21:05
-
-
Save stephenprater/1083441 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Thing | |
module Constants | |
BOO = 2 | |
end | |
module Methods | |
extend ActiveSupport::Concern | |
include Constants | |
module InstanceMethods | |
def boo | |
BOO | |
end | |
end | |
end | |
class Includify | |
include Methods | |
end | |
end | |
Thing::Includify.new.boo #=> unitialize Constant Thing::InstanceMethods::BOO | |
Thing::Methods.constants #=> [:InstanceMethods, :BOO] | |
module Thing | |
module Methods | |
extend ActiveSupport::Concern | |
BOO = 2 | |
module InstanceMethods | |
def boo | |
BOO | |
end | |
end | |
end | |
class Includify | |
include Methods | |
end | |
end | |
Thing::Includify.new.boo #=> 2 | |
Thing::Methods.constants #=> [:BOO, :InstanceMethods] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment