Class: Nanoc::CLI::Commands::Compile::Listener Abstract
- Inherits:
-
Object
- Object
- Nanoc::CLI::Commands::Compile::Listener
- Defined in:
- lib/nanoc/cli/commands/compile.rb
Overview
Direct Known Subclasses
DebugPrinter, DiffGenerator, FileActionPrinter, GCController, TimingRecorder
Class Method Summary (collapse)
-
+ (Boolean) enable_for?(command_runner)
abstract
True if this listener should be enabled for the given command runner, false otherwise.
Instance Method Summary (collapse)
-
- (Listener) initialize(params = {})
constructor
A new instance of Listener.
-
- (void) start
abstract
Starts the listener.
-
- (void) stop
Stops the listener.
Constructor Details
- (Listener) initialize(params = {})
Returns a new instance of Listener
36 37 |
# File 'lib/nanoc/cli/commands/compile.rb', line 36 def initialize(params = {}) end |
Class Method Details
+ (Boolean) enable_for?(command_runner)
This method is abstract.
Returns true
by default, but subclasses may override this.
Returns true if this listener should be enabled for the given command runner, false otherwise
44 45 46 |
# File 'lib/nanoc/cli/commands/compile.rb', line 44 def self.enable_for?(command_runner) true end |
Instance Method Details
- (void) start
This method is abstract.
This method returns an undefined value.
Starts the listener. Subclasses should override this method and set up listener notifications.
53 54 55 |
# File 'lib/nanoc/cli/commands/compile.rb', line 53 def start raise NotImplementedError, 'Subclasses of Listener should implement #start' end |
- (void) stop
This method returns an undefined value.
Stops the listener. The default implementation removes self from all notification center observers.
60 61 |
# File 'lib/nanoc/cli/commands/compile.rb', line 60 def stop end |