Sha256: eb8896039ef3dd529a4f4b12b996e732e7bbca0de56e8b6d70a2af955bbb3f91

Contents?: true

Size: 674 Bytes

Versions: 41

Compression:

Stored size: 674 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Int
  # @api private
  class ItemRepBuilder
    attr_reader :reps

    def initialize(site, action_provider, reps)
      @site = site
      @action_provider = action_provider
      @reps = reps
    end

    def run
      @site.items.each do |item|
        @action_provider.rep_names_for(item).each do |rep_name|
          @reps << Nanoc::Int::ItemRep.new(item, rep_name)
        end
      end

      action_sequences = Nanoc::Int::ItemRepRouter.new(@reps, @action_provider, @site).run

      @reps.each do |rep|
        rep.snapshot_defs = action_sequences[rep].snapshots_defs
      end

      action_sequences
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
nanoc-4.11.0 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.10.4 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.10.3 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.10.2 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.10.1 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.10.0 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.9 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.8 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.7 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.6 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.5 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.4 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.3 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.2 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.1 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.9.0 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.8.19 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.8.18 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.8.17 lib/nanoc/base/services/item_rep_builder.rb
nanoc-4.8.16 lib/nanoc/base/services/item_rep_builder.rb