Dynamically 'including' module methods possible?

C

C Cole

I've got a number of modules defined in a particular folder that I would like to automatically have 'included' in a class, instead of having to hard-code 'include' statements for each one. Is this possible?

a_folder
1_module.rb
2_module.rb
3_module.rb
..

Somewhat repeating myself: When the class is initially loaded, I'd like it to dynamically compile a list of the modules in a particular folder that will then be individually included.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top