Class: Omnizip::Progress::ProgressReporter Abstract
- Inherits:
-
Object
- Object
- Omnizip::Progress::ProgressReporter
- Defined in:
- lib/omnizip/progress/progress_reporter.rb
Overview
This class is abstract.
Subclass and override #report to implement a reporter
Abstract base class for progress reporters.
This class defines the interface for progress reporting strategies. Subclasses implement specific reporting mechanisms (console, callback, log file, etc.).
Direct Known Subclasses
CallbackReporter, ConsoleReporter, LogReporter, SilentReporter
Instance Method Summary collapse
-
#finish(progress) ⇒ Object
Called when operation completes (optional hook).
-
#report(progress) ⇒ Object
Report progress to the output mechanism.
-
#start(progress) ⇒ Object
Called when operation starts (optional hook).
Instance Method Details
#finish(progress) ⇒ Object
Called when operation completes (optional hook)
35 36 37 |
# File 'lib/omnizip/progress/progress_reporter.rb', line 35 def finish(progress) # Optional hook for subclasses end |
#report(progress) ⇒ Object
Report progress to the output mechanism
21 22 23 |
# File 'lib/omnizip/progress/progress_reporter.rb', line 21 def report(progress) raise NotImplementedError, "#{self.class} must implement #report" end |
#start(progress) ⇒ Object
Called when operation starts (optional hook)
28 29 30 |
# File 'lib/omnizip/progress/progress_reporter.rb', line 28 def start(progress) # Optional hook for subclasses end |