Class: Nanoc::Core::CompilationPhases::Abstract
Instance Method Summary
collapse
enabled?, included, setup_once, warn_about_performance
Constructor Details
#initialize(wrapped:) ⇒ Abstract
Returns a new instance of Abstract.
9
10
11
|
# File 'lib/nanoc/core/compilation_phases/abstract.rb', line 9
def initialize(wrapped:)
@wrapped = wrapped
end
|
Instance Method Details
#call(rep, is_outdated:) ⇒ Object
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/nanoc/core/compilation_phases/abstract.rb', line 21
def call(rep, is_outdated:)
notify(:phase_started, rep)
run(rep, is_outdated:) do
notify(:phase_yielded, rep)
@wrapped.call(rep, is_outdated:)
notify(:phase_resumed, rep)
end
notify(:phase_ended, rep)
rescue
notify(:phase_aborted, rep)
raise
end
|
#run(_rep, is_outdated:) ⇒ Object
35
36
37
|
# File 'lib/nanoc/core/compilation_phases/abstract.rb', line 35
def run(_rep, is_outdated:)
raise NotImplementedError
end
|
#start ⇒ Object
13
14
15
|
# File 'lib/nanoc/core/compilation_phases/abstract.rb', line 13
def start
@wrapped&.start
end
|
#stop ⇒ Object
17
18
19
|
# File 'lib/nanoc/core/compilation_phases/abstract.rb', line 17
def stop
@wrapped&.stop
end
|