Dynamically 'including' module methods possible?

Discussion in 'Ruby' started by C Cole, Jul 1, 2011.

  1. C Cole

    C Cole Guest

    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
    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.
     
    C Cole, Jul 1, 2011
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.