Class/Module Index [+]

Quicksearch

Nanoc::CLI::Commands::Compile::DebugPrinter

Prints debug information (compilation started/ended, filtering started/ended, …)

Public Class Methods

enable_for?(command_runner) click to toggle source

@see Listener#enable_for?

# File lib/nanoc/cli/commands/compile.rb, line 271
def self.enable_for?(command_runner)
  command_runner.debug?
end

Public Instance Methods

start() click to toggle source

@see Listener#start

# File lib/nanoc/cli/commands/compile.rb, line 276
def start
  Nanoc::NotificationCenter.on(:compilation_started) do |rep|
    puts "*** Started compilation of #{rep.inspect}"
  end
  Nanoc::NotificationCenter.on(:compilation_ended) do |rep|
    puts "*** Ended compilation of #{rep.inspect}"
    puts
  end
  Nanoc::NotificationCenter.on(:compilation_failed) do |rep, e|
    puts "*** Suspended compilation of #{rep.inspect}: #{e.message}"
  end
  Nanoc::NotificationCenter.on(:cached_content_used) do |rep|
    puts "*** Used cached compiled content for #{rep.inspect} instead of recompiling"
  end
  Nanoc::NotificationCenter.on(:filtering_started) do |rep, filter_name|
    puts "*** Started filtering #{rep.inspect} with #{filter_name}"
  end
  Nanoc::NotificationCenter.on(:filtering_ended) do |rep, filter_name|
    puts "*** Ended filtering #{rep.inspect} with #{filter_name}"
  end
  Nanoc::NotificationCenter.on(:visit_started) do |item|
    puts "*** Started visiting #{item.inspect}"
  end
  Nanoc::NotificationCenter.on(:visit_ended) do |item|
    puts "*** Ended visiting #{item.inspect}"
  end
  Nanoc::NotificationCenter.on(:dependency_created) do |src, dst|
    puts "*** Dependency created from #{src.inspect} onto #{dst.inspect}"
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.