Class: Topographer::Importer::Logger::Simple
- Defined in:
- lib/topographer/importer/logger/simple.rb
Instance Attribute Summary collapse
-
#failures ⇒ Object
readonly
Returns the value of attribute failures.
-
#successes ⇒ Object
readonly
Returns the value of attribute successes.
Attributes inherited from Base
Instance Method Summary collapse
- #failed_imports ⇒ Object
-
#initialize ⇒ Simple
constructor
A new instance of Simple.
- #log_failure(message) ⇒ Object
- #log_success(message) ⇒ Object
- #successful_imports ⇒ Object
Methods inherited from Base
#all_entries, #entries?, #errors?, #fatal_error?, #log_fatal, #log_import, #save, #total_imports
Constructor Details
#initialize ⇒ Simple
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
#failures ⇒ Object (readonly)
Returns the value of attribute failures.
3 4 5 |
# File 'lib/topographer/importer/logger/simple.rb', line 3 def failures @failures end |
#successes ⇒ Object (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_imports ⇒ Object
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() @failures << end |
#log_success(message) ⇒ Object
11 12 13 |
# File 'lib/topographer/importer/logger/simple.rb', line 11 def log_success() @successes << end |
#successful_imports ⇒ Object
19 20 21 |
# File 'lib/topographer/importer/logger/simple.rb', line 19 def successful_imports @successes.size end |