Module | RR::ScanProgressPrinters |
In: |
lib/rubyrep/scan_progress_printers/progress_bar.rb
lib/rubyrep/scan_progress_printers/scan_progress_printers.rb |
Manages scan progress printers. Scan progress printers implement functionality to report the progress of a table scan. Each table scan is handled by a separate printer instance.
Scan progress printers need to register themselves and their command line options with register.
A scan progress printer needs to implement at the minimum the following functionality:
# Receives the command line argument as yielded by OptionParser#on. def self.arg=(arg) # Creation of a new ScanProgressPrinter. # * +max_steps+: number of steps at completion # * +session+: the current Session # * +left_table+: name of the left database table # * +right_table+: name of the right database table def initialize(max_steps, left_table, right_table) # Progress is advanced by +progress+ number of steps. def step(progress)
Registers all report printer command line options into the given OptionParser. Once the command line is parsed with OptionParser#parse! it will yield the correct printer class.
Note: If multiple printers are specified in the command line, all are yielded.
Hash of registered ScanProgressPrinters. Each entry is a hash with the following key and related value:
Needs to be called by ScanProgressPrinters to register themselves (printer) and their command line options.