Class: AbstractImporter::Reporters::BaseReporter
- Inherits:
-
Object
- Object
- AbstractImporter::Reporters::BaseReporter
show all
- Defined in:
- lib/abstract_importer/reporters/base_reporter.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseReporter.
6
7
8
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 6
def initialize(io)
@io = io
end
|
Instance Attribute Details
#io ⇒ Object
Returns the value of attribute io.
4
5
6
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 4
def io
@io
end
|
Instance Method Details
#batch_inserted(size) ⇒ Object
41
42
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 41
def batch_inserted(size)
end
|
#count_error(message) ⇒ Object
49
50
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 49
def count_error(message)
end
|
#count_notice(message) ⇒ Object
46
47
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 46
def count_notice(message)
end
|
#finish_all(importer, ms) ⇒ Object
16
17
18
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 16
def finish_all(importer, ms)
io.puts "\n\nFinished in #{distance_of_time(ms)}"
end
|
#finish_collection(collection, summary) ⇒ Object
30
31
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 30
def finish_collection(collection, summary)
end
|
#finish_setup(importer, ms) ⇒ Object
20
21
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 20
def finish_setup(importer, ms)
end
|
#finish_teardown(importer, ms) ⇒ Object
23
24
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 23
def finish_teardown(importer, ms)
end
|
#record_created(record) ⇒ Object
35
36
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 35
def record_created(record)
end
|
#record_failed(record, hash) ⇒ Object
38
39
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 38
def record_failed(record, hash)
end
|
#start_all(importer) ⇒ Object
12
13
14
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 12
def start_all(importer)
io.puts "Importing #{importer.describe_source} to #{importer.describe_destination}\n"
end
|
#start_collection(collection) ⇒ Object
26
27
28
|
# File 'lib/abstract_importer/reporters/base_reporter.rb', line 26
def start_collection(collection)
io.puts "\n#{("="*80)}\nImporting #{collection.name}\n#{("="*80)}\n"
end
|