Sha256: 1c66577cdebcf09f14fcce66e68c43664e38846220d2d63985446dac96088135

Contents?: true

Size: 466 Bytes

Versions: 23

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Int::Compiler::Stages
  class Prune
    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

23 entries across 23 versions & 1 rubygems

Version Path
nanoc-4.8.17 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.16 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.15 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.14 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.13 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.12 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.11 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.10 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.9 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.8 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.7 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.6 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.5 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.4 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.3 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.2 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.1 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.8.0 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.7.14 lib/nanoc/base/services/compiler/stages/prune.rb
nanoc-4.7.13 lib/nanoc/base/services/compiler/stages/prune.rb