lib/csv_piper/piper.rb in csv_piper-0.1.3 vs lib/csv_piper/piper.rb in csv_piper-0.1.4

- old
+ new

@@ -3,10 +3,10 @@ HEADER_LINE_INDEX = 1 FIRST_DATA_LINE_INDEX = 2 CSV_HEADER_OPTIONS = { headers: true, return_headers: true, skip_blanks: true, skip_lines: /^(\s*,)*$/ } def initialize(io_stream:, pre_processors: [], processors: [], csv_options: {}, required_headers: []) - @pre_processors = [PreProcessors::RemoveExtraColumns.new] + pre_processors + @pre_processors = pre_processors @processors = processors @required_headers = required_headers @csv_options = csv_options.merge(CSV_HEADER_OPTIONS) @csv_options = @csv_options.merge(skip_lines: "^(\s*#{@csv_options[:col_sep]})*$") if @csv_options[:col_sep] @io = io_stream