Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Dynamically 'including' module methods possible?

Thread Tools

Dynamically 'including' module methods possible?

C Cole
Posts: n/a
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?

> 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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to find the class methods of a class, just like'methods' finds the instance methods? Kenneth McDonald Ruby 5 09-26-2008 03:09 PM
Using object methods of first module in methods of second module Nikita Petrov Ruby 2 04-06-2008 08:49 PM
Class Methods vs Module Methods? PHP HD Ruby 2 06-18-2007 04:34 PM
alias to module methods or class methods Geert Fannes Ruby 1 04-04-2005 12:29 PM
Module nesting and module vs. instance methods gga Ruby 3 02-19-2005 10:50 PM