I was just over looking at this question. The first thought that popped to my head was that ruby must have some sort of "as" type keyword like Python's import to help avoid namespace pollution. I've googled a bit but it seems that it's recommended to wrap your code in modules to avoid namespace problems with ruby. This seems problematic because what if two modules have conflicting names.
So, any "as开发者_JAVA技巧" type keywords for ruby's require?
What I always do is start my modules with my company initials for work or my own initials for my personal projects.
module JWG_TwitterTools
.
.
.
end
In ruby 2.0, there will be mix
(search for mix). But now, there is nothing like that... Simply use the full constant path.
精彩评论