Sha256: 6e168ffbf6f48d3b45d0eac95c54bda8d609ff310034a340a1ac11aa97802823

Contents?: true

Size: 308 Bytes

Versions: 6

Compression:

Stored size: 308 Bytes

Contents

module CsvPiper
  module Processors
    class CollectErrors
      attr_reader :errors
      def initialize
        @errors = {}
      end

      def process(source, transformed, errors)
        @errors[errors.row_index] = errors unless errors.empty?
        [transformed, errors]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
csv_piper-0.1.6 lib/csv_piper/processors/collect_errors.rb
csv_piper-0.1.5 lib/csv_piper/processors/collect_errors.rb
csv_piper-0.1.4 lib/csv_piper/processors/collect_errors.rb
csv_piper-0.1.3 lib/csv_piper/processors/collect_errors.rb
csv_piper-0.1.2 lib/csv_piper/processors/collect_errors.rb
csv_piper-0.1.1 lib/csv_piper/processors/collect_errors.rb