Daniel Berger
4/29/2008 5:59:00 PM
On Apr 29, 11:33=A0am, "ara.t.howard" <ara.t.how...@gmail.com> wrote:
> On Apr 29, 2008, at 2:58 AM, I=F1aki Baz Castillo wrote:
>
> > headers_path =3D File.dirname(__FILE__) + '/headers'
> > =A0Dir.chdir(headers_path)
> > =A0Dir["*.rb"].each do |file|
> > =A0 =A0 =A0require "#{headers_path}/#{file}"
> > =A0end
>
> > Is it enought ok or can it receive some Ruby's magic? XD
>
> glob =3D File.join( File.dirname(__FILE__), 'headers', '*.rb' )
>
> Dir.glob(glob){|lib| require lib}
>
> is a bit shorter...
I seem to recall proposals for allowing something like "require header/
*" ala Java's import (maybe I brought it up myself?) but I can't
remember what the arguments against it were.
Dan