Class: Snuffle::Formatters::Csv
- Inherits:
-
Object
- Object
- Snuffle::Formatters::Csv
show all
- Includes:
- Base
- Defined in:
- lib/snuffle/formatters/csv.rb
Instance Method Summary
collapse
Methods included from Base
#columns, #content, #export, #filename, included, #initialize, #output_path, #path_to_results, #root_path
Instance Method Details
#file_extension ⇒ Object
21
22
23
|
# File 'lib/snuffle/formatters/csv.rb', line 21
def file_extension
".csv"
end
|
18
19
|
# File 'lib/snuffle/formatters/csv.rb', line 18
def
end
|
8
9
10
|
# File 'lib/snuffle/formatters/csv.rb', line 8
def
columns.join(',')
end
|
#rows ⇒ Object
12
13
14
15
16
|
# File 'lib/snuffle/formatters/csv.rb', line 12
def rows
summary.cohorts.group_by{|c| c.values}.map do |cohort|
[summary.path_to_file, summary.class_name, cohort[0].join("; "), cohort[1].map(&:line_numbers).join("; ")].join(',')
end
end
|