Class: Nanoc::CLI::Commands::Compile::DebugPrinter Private
- Defined in:
- lib/nanoc/cli/commands/compile.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Prints debug information (compilation started/ended, filtering started/ended, …)
Class Method Summary collapse
Instance Method Summary collapse
- #start ⇒ Object private
Methods inherited from Listener
#initialize, #start_safely, #stop, #stop_safely
Constructor Details
This class inherits a constructor from Nanoc::CLI::Commands::Compile::Listener
Class Method Details
.enable_for?(command_runner) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
293 294 295 |
# File 'lib/nanoc/cli/commands/compile.rb', line 293 def self.enable_for?(command_runner) command_runner.debug? end |
Instance Method Details
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/nanoc/cli/commands/compile.rb', line 298 def start Nanoc::Int::NotificationCenter.on(:compilation_started) do |rep| puts "*** Started compilation of #{rep.inspect}" end Nanoc::Int::NotificationCenter.on(:compilation_ended) do |rep| puts "*** Ended compilation of #{rep.inspect}" puts end Nanoc::Int::NotificationCenter.on(:compilation_failed) do |rep, e| puts "*** Suspended compilation of #{rep.inspect}: #{e.}" end Nanoc::Int::NotificationCenter.on(:cached_content_used) do |rep| puts "*** Used cached compiled content for #{rep.inspect} instead of recompiling" end Nanoc::Int::NotificationCenter.on(:filtering_started) do |rep, filter_name| puts "*** Started filtering #{rep.inspect} with #{filter_name}" end Nanoc::Int::NotificationCenter.on(:filtering_ended) do |rep, filter_name| puts "*** Ended filtering #{rep.inspect} with #{filter_name}" end Nanoc::Int::NotificationCenter.on(:dependency_created) do |src, dst| puts "*** Dependency created from #{src.inspect} onto #{dst.inspect}" end end |