From: Aldric Giacomoni Date: 2009-11-06T04:22:52+09:00 Subject: Re: Executing one of several ruby objects Don French wrote: > On Nov 4, 10:13�pm, Robert Klemme wrote: >> >> >> -- >> remember.guy do |as, often| as.you_can - without endhttp://blog.rubybestpractices.com/ > > > Thank you for the reply. > > The problem is normally you have to specify each of the modules or > external classes you are going to use in the source. That does not > work. They are not know until run-time. It will include rb file from a > specified director. Each of the files in the directory will have a > "descriptor" in it that has the "identification" class method that > will be called. When it identifies what is should it will return a non > nil object. > > I understanding the calling of the method, it is how to load each of > those files into an array so that they can be executed when needed. I > am probably making this harder than it should be. > > Mahalo (thank you) > Don a = Dir.glob '*' a.delete_if { |node| File.directory? node } Woo! List of files in the current directory! .. Is that what you want? -- Posted via http://www.ruby-forum.com/.