Conditions | 1 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | require "csv" |
||
6 | def parse(contents, &block) |
||
7 | contents = contents.split("\n") |
||
8 | titles = contents.shift |
||
9 | column_names = CSV.parse(titles, col_sep: column_separator).first |
||
10 | |||
11 | options = { |
||
12 | column_names: column_names, |
||
13 | column_separator: column_separator |
||
14 | } |
||
15 | |||
16 | contents = contents.join("\n") |
||
17 | MappedColumnsParser.new(options).parse(contents, &block) |
||
18 | end |
||
19 | end |
||
22 |