How can you instantiate or clone/wrap a module in ruby?

141 views Asked by At

I know by default Ruby modules are not instantiate. However I am using a gem with this singleton interface and I need two instances of it since there are two distinct configurations I need. Is there a way to deep clone or instantiate a second object or even wrap it in another close/module and run a second one with all it's methods?

module Example
  class << self
    def config
      ....
      Base.name = self.name
      ....
    end
  end
end
0

There are 0 answers