Sha256: 7759a3fa516011b52a9d1c3f04406e8379a6304e8c9787422bb25a0abf704ce1

Contents?: true

Size: 346 Bytes

Versions: 11

Compression:

Stored size: 346 Bytes

Contents

module CsvPiper
  module Errors
    class Row
      extend Forwardable
      delegate :empty? => :errors

      attr_reader :row_index, :errors

      def initialize(row_index)
        @row_index = row_index
        @errors = Hash.new { [].freeze }
      end

      def add(key, error)
        @errors[key] += [error]
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
csv_piper-1.0.0 lib/csv_piper/errors/row.rb
csv_piper-0.1.9 lib/csv_piper/errors/row.rb
csv_piper-0.1.8 lib/csv_piper/errors/row.rb
csv_piper-0.1.7 lib/csv_piper/errors/row.rb
csv_piper-0.1.6 lib/csv_piper/errors/row.rb
csv_piper-0.1.5 lib/csv_piper/errors/row.rb
csv_piper-0.1.4 lib/csv_piper/errors/row.rb
csv_piper-0.1.3 lib/csv_piper/errors/row.rb
csv_piper-0.1.2 lib/csv_piper/errors/row.rb
csv_piper-0.1.1 lib/csv_piper/errors/row.rb
csv_piper-0.1.0 lib/csv_piper/errors/row.rb