Sha256: d6ecef34870cc370ef07b67e21f6042296f0a69e5c1765477e470f828bc5070f

Contents?: true

Size: 728 Bytes

Versions: 18

Compression:

Stored size: 728 Bytes

Contents

# frozen_string_literal: true

module Nanoc::Int
  # @api private
  class OutdatednessRule
    include Nanoc::Int::ContractsSupport
    include Singleton

    def call(obj, outdatedness_checker)
      Nanoc::Int::Instrumentor.call(:outdatedness_rule_ran, self.class) do
        apply(obj, outdatedness_checker)
      end
    end

    def apply(_obj, _outdatedness_checker)
      raise NotImplementedError.new('Nanoc::Int::OutdatednessRule subclasses must implement #apply')
    end

    contract C::None => String
    def inspect
      "#{self.class.name}(#{reason})"
    end

    def self.affects_props(*names)
      @affected_props = Set.new(names)
    end

    def self.affected_props
      @affected_props
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.11.0 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.10.4 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.10.3 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.10.2 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.10.1 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.10.0 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.9 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.8 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.7 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.6 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.5 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.4 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.3 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.2 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.1 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.9.0 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.8.19 lib/nanoc/base/services/outdatedness_rule.rb
nanoc-4.8.18 lib/nanoc/base/services/outdatedness_rule.rb