class Topographer::Importer::Strategy::ImportStatus
Attributes
errors[R]
input_identifier[R]
message[RW]
timestamp[R]
Public Class Methods
new(input_identifier)
click to toggle source
# File lib/topographer/importer/strategy/import_status.rb, line 8 def initialize(input_identifier) @input_identifier = input_identifier @errors = {mapping: [], validation: []} end
Public Instance Methods
add_error(error_source, error)
click to toggle source
# File lib/topographer/importer/strategy/import_status.rb, line 19 def add_error(error_source, error) errors[error_source] << error end
error_count()
click to toggle source
# File lib/topographer/importer/strategy/import_status.rb, line 23 def error_count errors.values.flatten.length end
errors?()
click to toggle source
# File lib/topographer/importer/strategy/import_status.rb, line 27 def errors? errors.values.flatten.any? end
set_timestamp()
click to toggle source
# File lib/topographer/importer/strategy/import_status.rb, line 15 def set_timestamp @timestamp ||= DateTime.now end