Sha256: 30e132a3c4f5a679f2e951b353bdd0b5629c64c63c5ed3fa2039b27a0dd0bc63
Contents?: true
Size: 641 Bytes
Versions: 7
Compression:
Stored size: 641 Bytes
Contents
# frozen_string_literal: true module Nanoc module Int class Compiler class Stage 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 def run(*) raise NotImplementedError end private def notify(sym) name = self.class.to_s.sub(/^.*::/, '') Nanoc::Core::NotificationCenter.post(sym, name) end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems