Method: FileList#gsub

Defined in:
lib/filelist.rb

#gsub(pat, rep) ⇒ Object

Return a new FileList with the results of running gsub against each element of the original list.

Example:

FileList['lib/test/file', 'x/y'].gsub(/\//, "\\")
   => ['lib\\test\\file', 'x\\y']


268
269
270
# File 'lib/filelist.rb', line 268

def gsub(pat, rep)
  inject(FileList.new) { |res, fn| res << fn.gsub(pat,rep) }
end