Class: Nanoc::Core::OutdatednessRule Private

Inherits:
Object
  • Object
show all
Includes:
ContractsSupport, Singleton
Defined in:
lib/nanoc/core/outdatedness_rule.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ContractsSupport

enabled?, included, setup_once, warn_about_performance

Class Method Details

.affected_propsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



29
30
31
# File 'lib/nanoc/core/outdatedness_rule.rb', line 29

def self.affected_props
  @affected_props
end

.affects_props(*names) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



25
26
27
# File 'lib/nanoc/core/outdatedness_rule.rb', line 25

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

Instance Method Details

#apply(_obj, _outdatedness_checker) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/nanoc/core/outdatedness_rule.rb', line 16

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

#call(obj, outdatedness_checker) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10
11
12
13
14
# File 'lib/nanoc/core/outdatedness_rule.rb', line 10

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

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
# File 'lib/nanoc/core/outdatedness_rule.rb', line 21

def inspect
  "#{self.class.name}(#{reason})"
end