Sha256: c9c503a6098e5d2ffc4d522ff8933c7dac032925ad4190f43e77a6ea69f91e9b

Contents?: true

Size: 617 Bytes

Versions: 4

Compression:

Stored size: 617 Bytes

Contents

# frozen_string_literal: true

module Nanoc
  module Int
    module OutdatednessRules
      class ItemCollectionExtended < Nanoc::Core::OutdatednessRule
        affects_props :raw_content

        contract Nanoc::Core::ItemCollection, C::Named['Nanoc::Int::OutdatednessChecker'] => C::Maybe[Nanoc::Core::OutdatednessReasons::Generic]
        def apply(_obj, outdatedness_checker)
          new_items = outdatedness_checker.dependency_store.new_items

          if new_items.any?
            Nanoc::Core::OutdatednessReasons::ItemCollectionExtended.new(new_items)
          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/item_collection_extended.rb
nanoc-4.11.11 lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb
nanoc-4.11.10 lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb
nanoc-4.11.9 lib/nanoc/base/services/outdatedness_rules/item_collection_extended.rb