Deconflicting namespaces

Hello,

I’m in the unfortunate position of needing to include a gem whose name
conflict with an existing class in my application. Specifically, I
already have a Color class, and I’m trying to add the Color (v1.4)
gem. Obviously these namespaces conflict.

Is there some magical way that I can wrap the Color gem in another
namespace when I require it, so that instead of just Color::* it
becomes External::Color::*?

Going through all my code and changing the name of my Color class is
turning out to be not only painful, but probably highly error prone.

Thanks,
AVram

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs