Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Dynamically 'including' module methods possible?

 
 
C Cole
Guest
Posts: n/a
 
      07-01-2011
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.
 
Reply With Quote
 
 
 
Reply

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



Advertisments