Class: Nanoc::Core::OutdatednessRules::NotWritten

Inherits:
Nanoc::Core::OutdatednessRule show all
Defined in:
lib/nanoc/core/outdatedness_rules/not_written.rb

Instance Method Summary collapse

Methods inherited from Nanoc::Core::OutdatednessRule

affects_attributes?, affects_compiled_content?, affects_path?, affects_props, affects_raw_content?, #call, #inspect

Methods included from ContractsSupport

enabled?, included, setup_once, warn_about_performance

Instance Method Details

#apply(obj, outdatedness_checker) ⇒ Object



9
10
11
12
13
# File 'lib/nanoc/core/outdatedness_rules/not_written.rb', line 9

def apply(obj, outdatedness_checker)
  if obj.raw_paths.values.flatten.compact.any? { |fn| !exist?(fn, outdatedness_checker) }
    Nanoc::Core::OutdatednessReasons::NotWritten
  end
end