Class: Nanoc::Int::Compiler::Stages::Prune

Inherits:
Object
  • Object
show all
Defined in:
lib/nanoc/base/services/compiler/stages/prune.rb

Instance Method Summary collapse

Constructor Details

#initialize(config:, reps:) ⇒ Prune

Returns a new instance of Prune



5
6
7
8
# File 'lib/nanoc/base/services/compiler/stages/prune.rb', line 5

def initialize(config:, reps:)
  @config = config
  @reps = reps
end

Instance Method Details

#runObject



10
11
12
13
14
# File 'lib/nanoc/base/services/compiler/stages/prune.rb', line 10

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