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
> -----Original Message-----
> From: [email protected] [mailto:ironruby-core-
> [email protected]] On Behalf Of Mohammad Azam
> Sent: Monday, June 22, 2009 8:26 AM
> To: [email protected]
> Subject: [Ironruby-core] How to refer to the .rb files in a folder?
>
> 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 via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/ironruby-core
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core