Class: QDA::Filters::CodeReviewCSVOutput

Inherits:
CodeReviewOutputFilter show all
Defined in:
lib/weft/filters/output.rb

Constant Summary collapse

EXTENSION =
'csv'
DESCRIPTION =
'Code Review as spreadsheet'

Constants inherited from CodeReviewOutputFilter

QDA::Filters::CodeReviewOutputFilter::EXPORT_CLASS

Instance Method Summary collapse

Methods inherited from CodeReviewOutputFilter

def_name

Methods inherited from OutputFilter

#initialize

Constructor Details

This class inherits a constructor from QDA::Filters::OutputFilter

Instance Method Details

#write(cr, file = STDOUT, mode = nil) ⇒ Object



54
55
56
57
58
59
# File 'lib/weft/filters/output.rb', line 54

def write(cr, file = STDOUT, mode = nil )
  mode ||= cr.count_method
  CSV::Writer.generate(file) do | csv |
    cr.output_rows.each { | r | csv << r }
  end
end