Flowdock
class
Importance_2
Ruby latest stable (v2_5_5) - 0 notes - Superclass: Object

Class deprecated or moved

This class is deprecated or moved on the latest stable version. The last existing version (v2_2_9) is shown here.

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.

Constants

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

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

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

SPECIAL_RETURN = %w[ map collect sort sort_by select find_all reject grep compact flatten uniq values_at + - & | ]

MUST_NOT_DEFINE = %w[to_a to_ary partition * <<]

MUST_DEFINE = %w[inspect <=>]

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

Attributes

Show files where this class is defined (1 file)
Register or log in to add new notes.