I must use a ruby library that looks like it was written by a java developer because the namespaces are so looooooonngg. And I have to use a lot of the classes in the namespaces.
I would like to make my own namespace wrapper/alias. I tried this in irb
and it seems to work. My question is if this is the "correct" way to do it (eg include
vs extend
) and/or what gotchas I have to watch out for besides class name collisions
module System include ::Com::Company::Project::Core::System::Core # About 5 classes include ::Com::Company::Project::Core::System::Common # About 15 classes module SubSystem include ::Com::Company::Project::Core::SystemSubSystem::Core # About 10 classes include ::Com::Company::Project::Core::SystemSubSystem::Common # About 15 classes endend....facade = System::Facade.new( System::SubSystem.new(...) )