lib/nanoc/base/services/outdatedness_checker.rb in nanoc-4.7.0 vs lib/nanoc/base/services/outdatedness_checker.rb in nanoc-4.7.1

- old
+ new

@@ -17,17 +17,19 @@ Rules::ContentModified, Rules::AttributesModified, Rules::NotWritten, Rules::CodeSnippetsModified, Rules::ConfigurationModified, + Rules::UsesAlwaysOutdatedFilter, ].freeze RULES_FOR_LAYOUT = [ Rules::RulesModified, Rules::ContentModified, Rules::AttributesModified, + Rules::UsesAlwaysOutdatedFilter, ].freeze contract C::KeywordArgs[outdatedness_checker: OutdatednessChecker, reps: Nanoc::Int::ItemRepRepo] => C::Any def initialize(outdatedness_checker:, reps:) @outdatedness_checker = outdatedness_checker @@ -54,10 +56,10 @@ contract C::ArrayOf[Class], C::Or[Nanoc::Int::Item, Nanoc::Int::ItemRep, Nanoc::Int::Layout], OutdatednessStatus => C::Maybe[OutdatednessStatus] def apply_rules(rules, obj, status = OutdatednessStatus.new) rules.inject(status) do |acc, rule| if !acc.useful_to_apply?(rule) acc - elsif rule.instance.apply(obj, @outdatedness_checker) + elsif rule.instance.call(obj, @outdatedness_checker) acc.update(rule.instance.reason) else acc end end