Kernel#require accepting multiple arguments?
- From: Daniel Schierbeck <daniel.schierbeck@xxxxxxxxx>
- Date: Sun, 30 Oct 2005 16:14:44 +0100
What is the reason that Kernel#require only accepts one filename?
Implementing a version of `require' that can take multiple arguments is pretty easy:
module Kernel
alias_method :__require__, :require def require(*filenames)
filenames.all? { |file| __require__(file) }
end
end
Cheers, Daniel .
- Follow-Ups:
- Re: Kernel#require accepting multiple arguments?
- From: Yukihiro Matsumoto
- Re: Kernel#require accepting multiple arguments?
- From: Stefan Lang
- Re: Kernel#require accepting multiple arguments?
- Prev by Date: Re: Faster CSV parsing
- Next by Date: C# attributes in Ruby?
- Previous by thread: Re: Nitro + Og 0.24.0, Annotations, KirbyBase, SCGI, Og Evolution, Gen, Dynamic CSS...
- Next by thread: Re: Kernel#require accepting multiple arguments?
- Index(es):
Relevant Pages
|