class Nanoc::Core::CompilationStage

Public Instance Methods

call(*args) click to toggle source
# File lib/nanoc/core/compilation_stage.rb, line 6
def call(*args)
  notify(:stage_started)
  res = Nanoc::Core::Instrumentor.call(:stage_ran, self.class) do
    run(*args)
  end
  notify(:stage_ended)
  res
rescue
  notify(:stage_aborted)
  raise
end
run(*) click to toggle source
# File lib/nanoc/core/compilation_stage.rb, line 18
def run(*)
  raise NotImplementedError
end

Private Instance Methods

notify(sym) click to toggle source
# File lib/nanoc/core/compilation_stage.rb, line 24
def notify(sym)
  name = self.class.to_s.sub(/^.*::/, '')
  Nanoc::Core::NotificationCenter.post(sym, name)
end