vendor/gems/BlueCloth-1.0.0/utils.rb
### Given a <tt>filelist</tt> like that returned by #readManifest, remove
### the entries therein which match the Regexp objects in the given
### <tt>antimanifest</tt> and return the resultant Array.
Given a filelist like that returned by #readManifest, remove
the entries therein which match the Regexp objects in the given
antimanifest and return the resultant Array.
Given a filelist like that returned by #readManifest remove the entries therein which match the Regexp objects in the given antimanifest and return the resultant Array .
def vetManifest( filelist, antimanifest=ANITMANIFEST )
		origLength = filelist.length
		message "Vetting manifest..."
		for regex in antimanifest
			if $VERBOSE
				message "\n\tPattern /#{regex.source}/ removed: " +
					filelist.find_all {|file| regex.match(file)}.join(', ')
			end
			filelist.delete_if {|file| regex.match(file)}
		end
		message "removed #{origLength - filelist.length} files from the list.\n"
		return filelist
	end
def vetManifest ( filelist , antimanifest = ANITMANIFEST ) origLength = filelist . length message "Vetting manifest..." for regex in antimanifest if $VERBOSE message "\n\tPattern /#{regex.source}/ removed: " + filelist . find_all { | file | regex . match ( file ) } . join ( ', ' ) end filelist . delete_if { | file | regex . match ( file ) } end message "removed #{origLength - filelist.length} files from the list.\n" return filelist end
Given a <tt>filelist</tt> like that returned by #readManifest, remove
the entries therein which match the Regexp objects in the given
<tt>antimanifest</tt> and return the resultant Array.
Given a <tt > filelist< / tt > like that returned by #readManifest remove the entries therein which match the Regexp objects in the given <tt > antimanifest< / tt > and return the resultant Array .
filelist
<not_specific>
antimanifest
<not_specific>