class

Rake::FileList

v2_1_10 - Show latest stable - Superclass: Object

######################################################################### A FileList is essentially an array with a few helper methods defined to make file manipulation a bit easier.

FileLists are lazy. When given a list of glob patterns for possible files to be included in the file list, instead of searching the file structures to find the files, a FileList holds the pattern for latter use.

This allows us to define a number of FileList to match any number of files, but only search out the actual files when then FileList itself is actually used. The key is that the first time an element of the FileList/Array is requested, the pending patterns are resolved into a real list of file names.

Included modules

  • Rake::Cloneable

Constants

ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).\nmap { |n| n.to_s }

DEFAULT_IGNORE_PATTERNS = [\n/(^|[\\/\\\\])CVS([\\/\\\\]|$)/,\n/(^|[\\/\\\\])\\.svn([\\/\\\\]|$)/,\n/\\.bak$/,\n/~$/\n]

DEFAULT_IGNORE_PROCS = [\nproc { |fn| fn =~ /(^|[\\/\\\\])core$/ && ! File.directory?(fn) }\n]

DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).\nmap { |s| s.to_s }.sort.uniq

MUST_DEFINE = %w[inspect <=>]

MUST_NOT_DEFINE = %w[to_a to_ary partition *]

SPECIAL_RETURN = %w[\nmap collect sort sort_by select find_all reject grep\ncompact flatten uniq values_at\n+ - & |\n]

Files

  • lib/rake/file_list.rb