developer/ruby/DeprecatedMethods.rb
def output_to_csv(new_table)
  # Create a copy of the old CSV
  FileUtils.cp('deprecated_methods.csv', 'deprecated_methods.csv.bak')

  CSV.open(DEPRECATED_CSV_PATH, "wb") do |csv|
    csv << new_table.first.keys # adds the header
    new_table.each do |hash|
      csv << hash.values
    end
  end

  puts "Saved CSV to disk to #{DEPRECATED_CSV_PATH} (backed up old to deprecated_methods.csv.bak)"

end
# Save to CSV (and make a copy of old CSV)
Save to CSV (and make a copy of old CSV)
Save to CSV ( and make a copy of old CSV )
def output_to_csv(new_table)
  FileUtils.cp('deprecated_methods.csv', 'deprecated_methods.csv.bak')
  CSV.open(DEPRECATED_CSV_PATH, "wb") do |csv|
    csv << new_table.first.keys 
    new_table.each do |hash|
      csv << hash.values
    end
  end
  puts "Saved CSV to disk to #{DEPRECATED_CSV_PATH} (backed up old to deprecated_methods.csv.bak)"
end
def output_to_csv ( new_table ) FileUtils . cp ( 'deprecated_methods.csv' , 'deprecated_methods.csv.bak' ) CSV . open ( DEPRECATED_CSV_PATH , "wb" ) do | csv | csv << new_table . first . keys new_table . each do | hash | csv << hash . values end end puts "Saved CSV to disk to #{DEPRECATED_CSV_PATH} (backed up old to deprecated_methods.csv.bak)" end
Save to CSV (and make a copy of old CSV)
Save to CSV ( and make a copy of old CSV )
# Create a copy of the old CSV # adds the header
new_table