developer/ruby/DeprecatedMethods.rb
def output_to_markdown(new_table)

  File.open(DEPRECATED_MD_PATH, 'w') do |f|

    headers = ["Namespace", "Class Name", "Method", "Deprecated Since", "Replace With", "Removed In"]
    f.puts headers.join('   |    ')
    f.puts headers.map{'---'}.join('  |  ')

    new_table.each do |h|
      toprint = [
        h['Namespace'], h['Class Name'], h['Method'], add_link_to_sha(h), h['Replace With'], h['Removed In']
      ]
      f.puts toprint.join('   |    ')
    end
  end
  puts "Saved Markdown Table to disk to #{DEPRECATED_MD_PATH}"

end
# Format output as a Markdown table
Format output as a Markdown table
Format output as a Markdown table
def output_to_markdown(new_table)
  File.open(DEPRECATED_MD_PATH, 'w') do |f|
    headers = ["Namespace", "Class Name", "Method", "Deprecated Since", "Replace With", "Removed In"]
    f.puts headers.join('   |    ')
    f.puts headers.map{'---'}.join('  |  ')
    new_table.each do |h|
      toprint = [
        h['Namespace'], h['Class Name'], h['Method'], add_link_to_sha(h), h['Replace With'], h['Removed In']
      ]
      f.puts toprint.join('   |    ')
    end
  end
  puts "Saved Markdown Table to disk to #{DEPRECATED_MD_PATH}"
end
def output_to_markdown ( new_table ) File . open ( DEPRECATED_MD_PATH , 'w' ) do | f | headers = [ "Namespace" , "Class Name" , "Method" , "Deprecated Since" , "Replace With" , "Removed In" ] f . puts headers . join ( '   |    ' ) f . puts headers . map { '---' } . join ( '  |  ' ) new_table . each do | h | toprint = [ h [ 'Namespace' ] , h [ 'Class Name' ] , h [ 'Method' ] , add_link_to_sha ( h ) , h [ 'Replace With' ] , h [ 'Removed In' ] ] f . puts toprint . join ( '   |    ' ) end end puts "Saved Markdown Table to disk to #{DEPRECATED_MD_PATH}" end
Format output as a Markdown table
Format output as a Markdown table
new_table