lib/nanoc/base/services/compiler/phases/abstract.rb in nanoc-4.7.0 vs lib/nanoc/base/services/compiler/phases/abstract.rb in nanoc-4.7.1
- old
+ new
@@ -1,11 +1,10 @@
module Nanoc::Int::Compiler::Phases
class Abstract
include Nanoc::Int::ContractsSupport
- def initialize(wrapped:, name:)
- @name = name
+ def initialize(wrapped:)
@wrapped = wrapped
end
def call(rep, is_outdated:)
notify(:phase_started, rep)
@@ -26,9 +25,10 @@
end
private
def notify(sym, rep)
- Nanoc::Int::NotificationCenter.post(sym, @name, rep)
+ name = self.class.to_s.sub(/^.*::/, '')
+ Nanoc::Int::NotificationCenter.post(sym, name, rep)
end
end
end