Sha256: 67d45669cb22bb3241362de61aa60a234b2e39cc397d577f41e342a5d9b9a28c

Contents?: true

Size: 525 Bytes

Versions: 6

Compression:

Stored size: 525 Bytes

Contents

class Topographer::Importer::Strategy::ImportStatus
  attr_reader :errors, :input_identifier, :timestamp
  attr_accessor :message

  def initialize(input_identifier)
    @input_identifier = input_identifier
    @errors = {mapping: [],
               validation: []}

  end

  def set_timestamp
    @timestamp ||= DateTime.now
  end

  def add_error(error_source, error)
    errors[error_source] << error
  end

  def error_count
    errors.values.flatten.length
  end

  def errors?
    errors.values.flatten.any?
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
topographer-0.0.7 lib/topographer/importer/strategy/import_status.rb
topographer-0.0.6 lib/topographer/importer/strategy/import_status.rb
topographer-0.0.5 lib/topographer/importer/strategy/import_status.rb
topographer-0.0.4 lib/topographer/importer/strategy/import_status.rb
topographer-0.0.3 lib/Topographer/importer/strategy/import_status.rb
topographer-0.0.2 lib/Topographer/importer/strategy/import_status.rb