I would like to develop a small application that allows the user to automatically add their own classes by placing them in a specific directory (for example, extension / *. Rb).
After starting the application, I want to download all the files and download all the classes contained in this file. Subsequently, I would like to name a specific method.
In pseudo code, it will look like this:
for each file in extensions/*.rb
arr = loadclasses(file)
for each class in arr
obj = class.new_instance
obj.run
end
end
source
share