Method: CCReport#as_csv
- Defined in:
- lib/cc_report.rb
#as_csv ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/cc_report.rb', line 11 def as_csv begin @analyser.parse @source @output += "Name, CC" @analyser.functions.each do |function| @output += "\n#{function[:name]},#{function[:complexity]}" end rescue @output = "WARNING: Could not parse \n#{source} \n: SKIPPED" end @output end |