Class: Rectory::CsvOutputter
- Inherits:
-
Object
- Object
- Rectory::CsvOutputter
- Defined in:
- lib/rectory/csv_outputter.rb
Overview
Write the results of a test to a simple CSV file
Class Method Summary collapse
Class Method Details
.write(results, output, options = {}) ⇒ nil
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rectory/csv_outputter.rb', line 10 def self.write(results, output, = {}) CSV.open(output, "wb", ) do |csv| csv << ["url","location","code","result_location","result_code","pass"] results.each do |r| csv << [r.url, r.location, r.code, r.result[:location], r.result[:code], r.pass?] end end nil end |