RubyGems Navigation menu

required 0.1.1

Required, a utility to require all files in a directory Required provides the ability to require all files within a directory, with options for file inclusion/exclusion based on pattern matching, as well as recursive descent. An array of all the files that were loaded (‘require’ only loads a file the first time) are returned. Quick start First pull in the ‘required’ module: require 'required' To pull in all ruby files in a directory (this excludes subdirectories): required "some/path/to/dir" Same as before, but require the files in reverse alphanumeric order: required "some/path/to/dir", :sort => lambda { |x, y| y <=> x} To pull in files from multiple directories: required ["some/path/to/dir", "another/path/another/dir"] Or to recurse through subdirectories, requiring all files along the way: required "lib", {:recurse => true} Same as before, but exclude ruby files tagged as "_old": required "lib", {:recurse => true, :exclude => /_old/} # Will not require "lib/extensions/string_old.rb" Same as before, but only require ruby files tagged with "_new": required "lib", {:recurse => true, :include => /_new/}

Gemfile:
= Copy to clipboard Copied!

install:
=

Versions:

  1. 0.1.3 - April 02, 2010 (6.5 KB)
  2. 0.1.2 - April 01, 2010 (6.5 KB)
  3. 0.1.1 - April 01, 2010 (5.5 KB)
  4. 0.1.0 - April 01, 2010 (5.5 KB)

Owners:

Authors:

  • Arild Shirazi

SHA 256 checksum:

ad91b5c585a5369ddc46a092ac8d69303fe1286c9fba338ee2b55f7431018b16

Total downloads 15,273

For this version 3,329

Licenses:

N/A

Required Ruby Version: None

Links: