Forum: IronRuby How to refer to the .rb files in a folder?

Posted by Mohammad Azam (azamsharp)
on 2009-06-22 17:26
I am trying to refer to all the libraries (modules) in the libs folder
how can I achieve that:

require 'C:\ironruby\ironruby\Merlin\Main\Languages\Ruby\Libs'

The above code does not work!
Posted by Jim Deville (Guest)
on 2009-06-22 17:40
(Received via mailing list)
Dir.chdir(".") do
  Dir["*.rb"].each do |f|
    require f
   end
 end

I don't know of a way in Ruby to do what you are asking for without 
looping through the files.
Thanks,

JD

...there is no try
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.