Sha256: bedf1db12923bb365692e7c0f6efb4540495b5902757c51994b04bcab8eb7eb3
Contents?: true
Size: 606 Bytes
Versions: 9
Compression:
Stored size: 606 Bytes
Contents
module Nanoc::CLI::Commands::CompileListeners class Abstract def initialize(*); end def self.enable_for?(command_runner) # rubocop:disable Lint/UnusedMethodArgument true end def start raise NotImplementedError, "Subclasses of #{self.class} must implement #start" end def stop; end def start_safely start @_started = true end def stop_safely stop if @_started @_started = false end def on(sym) # TODO: clean up on stop Nanoc::Int::NotificationCenter.on(sym, self) { |*args| yield(*args) } end end end
Version data entries
9 entries across 9 versions & 1 rubygems