class Rake::FileList

def ext(newext='')

+ext+ is a user added method for the Array class.

array.collect { |item| item.ext(newext) }

This method is a shortcut for:

each member of the array.
Return a new FileList with String#ext method applied to
def ext(newext='')
  collect { |fn| fn.ext(newext) }
end