From: Tony Arcieri Date: 2009-06-10T02:31:17+09:00 Subject: Re: require_all 1.0.0: A wonderfully simple way to load your code --0016369202cb7665e7046bedb90b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Jun 9, 2009 at 7:06 AM, trans wrote: > > require 'facets/kernel/require_all' > Bah, should've checked facets first, but that really is the problem with facets... it's a big kitchen sink and you never know what you're going to find in there or not That said, this was yanked out of a larger system and incorporates some hacks for living along ActiveSupport and the boogiemen which lurk inside dependencies.rb. The idea predates Merb. However, it's always good too see how > implementations may have improved over time. > Thanks! I figure if nothing else it could have a more powerful API. > Also, I have seen another definition of #require_all floating around > that simply loads every .rb file in a given directory. I wonder if > both conceptions of this function (glob loading and directory loading) > could be integrated into one. Eg. > > require_all 'some/path' > > would do the same as > > require_all 'some/path/*.rb' > That seems as simple as checking if the given path is a directory. Perhaps it'd be a nice feature for 1.0.1 -- Tony Arcieri medioh.com --0016369202cb7665e7046bedb90b--