Sha256: 8b9aaae0425a223e770e65bdc849eb69b4d8b56d5e86208aad06d98f5ca1f311

Contents?: true

Size: 453 Bytes

Versions: 4

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

module Nanoc
  module Int
    module OutdatednessRules
      class NotWritten < Nanoc::Core::OutdatednessRule
        affects_props :raw_content, :attributes, :compiled_content, :path

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nanoc-4.11.12 lib/nanoc/base/services/outdatedness_rules/not_written.rb
nanoc-4.11.11 lib/nanoc/base/services/outdatedness_rules/not_written.rb
nanoc-4.11.10 lib/nanoc/base/services/outdatedness_rules/not_written.rb
nanoc-4.11.9 lib/nanoc/base/services/outdatedness_rules/not_written.rb