Load only what classes are being used in Ruby?
问题 If I load x.rb , then all the classes in that file are loaded. Is it possible to check and see what classes are being used and load those only? Assuming x.rb contains both Hello and Goodbye classes, and my program only uses the Hello Class, is it possible to load only the Hello Class? Happy with a script that checks the document, and outputs an .rb that has only the Hello Class and the code that uses it... Would be an interesting github project if doesn't exist, but I think it's out of my