Re: [Wtr-general] 'Require' Lots Of Files

2007-05-31 Thread Fletch
That did the trick. Thanks. Fletch. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Fletch
Hello Again All, I have created a couple of large test suites, which use LOTS of requires require 'dir/test1' require 'dir/test2' ... require 'dir/test25' In an effort to create tidier looking code, is it possible to use something like Java would have to import, or 'require' all the files in

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Paul Rogers
I use this method: def require_files_in_dir( start_dir ) files = Dir[ start_dir] files.each do |f| require f end end - Original Message - From: Fletch [EMAIL PROTECTED] Date: Wednesday, May 30, 2007 9:16 am Subject: [Wtr-general] 'Require' Lots

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Fletch
Thanks for the reply - not to sound silly at all, but where do I put this method? All the require files normally go at the top of the file, but I have tried putting the code everywhere I can think of and still have had no luck. -- require className def test1 end def test2 end end

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Paul Rogers
def require_files_in_dir end require_files_in_dir( 'c:\') require_files_in_dir( 'c:\temp') - Original Message - From: Fletch [EMAIL PROTECTED] Date: Wednesday, May 30, 2007 9:39 am Subject: Re: [Wtr-general] 'Require' Lots Of Files Thanks for the reply - not to sound silly

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Paul Rogers
the following in irb def x ; puts 'x'; end Object.instance_methods Paul - Original Message - From: Fletch [EMAIL PROTECTED] Date: Wednesday, May 30, 2007 9:39 am Subject: Re: [Wtr-general] 'Require' Lots Of Files Thanks for the reply - not to sound silly at all, but where do I put

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Paul Rogers
actually it seems you have to use it like this require_files_in_dir( 'c:\*.rb') - Original Message - From: Paul Rogers [EMAIL PROTECTED] Date: Wednesday, May 30, 2007 9:43 am Subject: Re: [Wtr-general] 'Require' Lots Of Files def require_files_in_dir end

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Fletch
Thanks, I still can not get it sorted. My methods are set up in a (java style) static context - FILENAME.methodName, and when I use the method for the requires, I am getting an uninitialized constant error message. ___ Wtr-general mailing list

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Bach Le
What I do is if I have to require a certain set of files repeatedly, I just place it in another .rb file and require that .rb file which will in turn require all of the files you need. So I would define a file called requirements.rb and then inside that file place require 'x' require

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Clayton John Givens
Why not put all those files into a gem? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bach Le Sent: Wednesday, May 30, 2007 10:30 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] 'Require' Lots Of Files What I do is if I have to require

Re: [Wtr-general] 'Require' Lots Of Files

2007-05-30 Thread Bret Pettichord
Fletch wrote: I have created a couple of large test suites, which use LOTS of requires require 'dir/test1' require 'dir/test2' ... require 'dir/test25' In an effort to create tidier looking code, is it possible to use something like Java would have to import, or 'require' all the files