Class: Nanoc::Core::CompilationStages::ForgetOutdatedDependencies

Inherits:
Nanoc::Core::CompilationStage show all
Includes:
Nanoc::Core::ContractsSupport
Defined in:
lib/nanoc/core/compilation_stages/forget_outdated_dependencies.rb

Instance Method Summary collapse

Methods included from Nanoc::Core::ContractsSupport

enabled?, included, setup_once, warn_about_performance

Methods inherited from Nanoc::Core::CompilationStage

#call

Constructor Details

#initialize(dependency_store:) ⇒ ForgetOutdatedDependencies

Returns a new instance of ForgetOutdatedDependencies.



9
10
11
# File 'lib/nanoc/core/compilation_stages/forget_outdated_dependencies.rb', line 9

def initialize(dependency_store:)
  @dependency_store = dependency_store
end

Instance Method Details

#run(outdated_items) ⇒ Object



14
15
16
# File 'lib/nanoc/core/compilation_stages/forget_outdated_dependencies.rb', line 14

def run(outdated_items)
  outdated_items.each { |i| @dependency_store.forget_dependencies_for(i) }
end