sportdb-models/lib/sportdb/pretty_printer.rb
def patch( save=false)
    files = find_files
    change_logs = []

    files.each do |file|
      p = PrettyPrinter.from_file( file )
      new_text, change_log = p.patch
      
      next if change_log.empty?   ## no changes
      
      if save
        File.open( file, 'w' ) do |f|
          f.write new_text
        end
      end

      change_logs << [file, change_log]
    end

    change_logs  ## return change_logs or empty array
  end
def patch( save=false)
    files = find_files
    change_logs = []

    files.each do |file|
      p = PrettyPrinter.from_file( file )
      new_text, change_log = p.patch
      
      next if change_log.empty?   ## no changes
      
      if save
        File.open( file, 'w' ) do |f|
          f.write new_text
        end
      end

      change_logs << [file, change_log]
    end

    change_logs  ## return change_logs or empty array
  end
method find_files