# File lib/brakeman/report/report_csv.rb, line 57 def table_to_csv table return "" unless table Brakeman.load_brakeman_dependency 'terminal-table' headings = table.headings if headings.is_a? Array headings = headings.first end output = CSV.generate_line(headings.cells.map{|cell| cell.to_s.strip}) table.rows.each do |row| output << CSV.generate_line(row.cells.map{|cell| cell.to_s.strip}) end output end