Iñaki Baz Castillo
6/17/2008 6:23:00 PM
El Martes, 17 de Junio de 2008, I=C3=B1aki Baz Castillo escribi=C3=B3:
> Hi, I load various rb files by doing:
>
> Dir["hdr_*.rb"].each do |file|
> require "#{file}"
> end
> How could I use
> "Dir[ ]" to get the files ordered alphabetically?
It was easy, I just must use "sort" method:
Dir["hdr_*.rb"].sort.each do |file|
require "#{file}"
end
=2D-=20
I=C3=B1aki Baz Castillo