Sha256: 0e399cac9075ddc790a8fa0a5649b6fc8b800435ae549cc3522f62dab1f1548c
Contents?: true
Size: 1.01 KB
Versions: 2
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true module Nanoc module Int class Compiler module Stages class StorePreCompilationState < Nanoc::Int::Compiler::Stage include Nanoc::Core::ContractsSupport def initialize(reps:, layouts:, checksum_store:, action_sequence_store:, action_sequences:) @reps = reps @layouts = layouts @checksum_store = checksum_store @action_sequence_store = action_sequence_store @action_sequences = action_sequences end contract Nanoc::Int::ChecksumCollection => C::Any def run(checksums) # Calculate action sequence (@reps.to_a + @layouts.to_a).each do |obj| @action_sequence_store[obj] = @action_sequences[obj].serialize end @action_sequence_store.store # Set checksums @checksum_store.checksums = checksums.to_h @checksum_store.store end end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
nanoc-4.11.2 | lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb |
nanoc-4.11.1 | lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb |