Class: Topographer::Importer::Logger::Simple

Inherits:
Base
  • Object
show all
Defined in:
lib/topographer/importer/logger/simple.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#fatal_errors

Instance Method Summary collapse

Methods inherited from Base

#all_entries, #entries?, #errors?, #fatal_error?, #log_fatal, #log_import, #save, #total_imports

Constructor Details

#initializeSimple

Returns a new instance of Simple.



5
6
7
8
9
# File 'lib/topographer/importer/logger/simple.rb', line 5

def initialize
  @successes = []
  @failures = []
  super
end

Instance Attribute Details

#failuresObject (readonly)

Returns the value of attribute failures.



3
4
5
# File 'lib/topographer/importer/logger/simple.rb', line 3

def failures
  @failures
end

#successesObject (readonly)

Returns the value of attribute successes.



3
4
5
# File 'lib/topographer/importer/logger/simple.rb', line 3

def successes
  @successes
end

Instance Method Details

#failed_importsObject



23
24
25
# File 'lib/topographer/importer/logger/simple.rb', line 23

def failed_imports
  @failures.size
end

#log_failure(message) ⇒ Object



15
16
17
# File 'lib/topographer/importer/logger/simple.rb', line 15

def log_failure(message)
  @failures << message
end

#log_success(message) ⇒ Object



11
12
13
# File 'lib/topographer/importer/logger/simple.rb', line 11

def log_success(message)
  @successes << message
end

#successful_importsObject



19
20
21
# File 'lib/topographer/importer/logger/simple.rb', line 19

def successful_imports
  @successes.size
end