Method: FileList#gsub
- Defined in:
- lib/carat/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']
200 201 202 |
# File 'lib/carat/filelist.rb', line 200 def gsub(pat, rep) inject(FileList.new) { |res, fn| res << fn.gsub(pat,rep) } end |