Created
October 2, 2013 16:33
-
-
Save misfo/6796529 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 MyApp | |
module Deeply | |
module Nested | |
module Namespace | |
class Useful | |
end | |
class AlsoUseful | |
end | |
end | |
end | |
end | |
end | |
# meanwhile in a script... | |
include MyApp::Deeply::Nested::Namespace | |
# this works now, but... | |
Useful.new | |
# we've polluted Object with everything that's in our namespace | |
p Object::Useful #=> MyApp::Deeply::Nested::Namespace::Useful | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment