On Apr 24, 6:35 am, Michael Neumann <mneum... / ntecs.de> wrote:

>    A::X
>    A::X::C
>    A::GenClass(1, 2, 3)
>    A::GenClass(1, 2, 3)::C
>
> Basically you can treat a method that returns a new class like a class,
> which is beautiful.

It is beautiful but it has namespace issues:

   module A
     class X
       C = 1
     end

     def self.GenClass(*args)
       Class.new(X) # do something here
     end

     class B
       def whatever
         GenClass()  # <-- won't be found
      end
   end

So (unfortunately) lookup is not like a regular constant.

T.