Sha256: 531651f714a295d4cb9752e7dd53c5fe57a08da4dad0b4cd2c5c17201cd98533

Contents?: true

Size: 496 Bytes

Versions: 18

Compression:

Stored size: 496 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Int::Compiler::Stages
  class Prune < Nanoc::Int::Compiler::Stage
    def initialize(config:, reps:)
      @config = config
      @reps = reps
    end

    def run
      if @config[:prune][:auto_prune]
        Nanoc::Pruner.new(@config, @reps, exclude: prune_config_exclude).run
      end
    end

    private

    def prune_config
      @config[:prune] || {}
    end

    def prune_config_exclude
      prune_config[:exclude] || {}
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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