Class: Nanoc::Int::Compiler::Phases::Write

Inherits:
Abstract
  • Object
show all
Defined in:
lib/nanoc/base/services/compiler/phases/write.rb

Instance Method Summary collapse

Methods inherited from Abstract

#call

Constructor Details

#initialize(snapshot_repo:, wrapped:) ⇒ Write

Returns a new instance of Write



7
8
9
10
11
# File 'lib/nanoc/base/services/compiler/phases/write.rb', line 7

def initialize(snapshot_repo:, wrapped:)
  super(wrapped: wrapped)

  @snapshot_repo = snapshot_repo
end

Instance Method Details

#run(rep, is_outdated:) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



14
15
16
17
18
# File 'lib/nanoc/base/services/compiler/phases/write.rb', line 14

def run(rep, is_outdated:) # rubocop:disable Lint/UnusedMethodArgument
  yield

  Nanoc::Int::ItemRepWriter.new.write_all(rep, @snapshot_repo)
end