Hello!

How can I get all new class names in file after require?

Example:

test.rb:

module MyModule
    class MyClass1
    ....
    class MyClass2
    ....
end

test1.rb:

module MyModule
    class LoadClasses
       def LoadClass.load_file
           require "test"
           
           (?????).each do | class_name |
                print "Class #{class_name} added\n"
           end

       end
    end
end

Anton Kondakov