Class: Nanoc::Core::OutdatednessRule Private

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

Overview

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.

API:

  • private

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ContractsSupport

enabled?, included, setup_once, warn_about_performance

Class Method Details

.affects_attributes?Boolean

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.

Returns:

API:

  • private



14
15
16
# File 'lib/nanoc/core/outdatedness_rule.rb', line 14

def self.affects_attributes?
  @affects_attributes
end

.affects_compiled_content?Boolean

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.

Returns:

API:

  • private



18
19
20
# File 'lib/nanoc/core/outdatedness_rule.rb', line 18

def self.affects_compiled_content?
  @affects_compiled_content
end

.affects_path?Boolean

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.

Returns:

API:

  • private



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

def self.affects_path?
  @affects_path
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.

API:

  • private



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/nanoc/core/outdatedness_rule.rb', line 22

def self.affects_props(*names)
  @affects_raw_content = false
  @affects_attributes = false
  @affects_compiled_content = false
  @affects_path = false

  names.each do |name|
    case name
    when :raw_content
      @affects_raw_content = true
    when :attributes
      @affects_attributes = true
    when :compiled_content
      @affects_compiled_content = true
    when :path
      @affects_path = true
    end
  end
end

.affects_raw_content?Boolean

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.

Returns:

API:

  • private



42
43
44
# File 'lib/nanoc/core/outdatedness_rule.rb', line 42

def self.affects_raw_content?
  @affects_raw_content
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:

API:

  • private



52
53
54
# File 'lib/nanoc/core/outdatedness_rule.rb', line 52

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.

API:

  • private



46
47
48
49
50
# File 'lib/nanoc/core/outdatedness_rule.rb', line 46

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.

API:

  • private



57
58
59
# File 'lib/nanoc/core/outdatedness_rule.rb', line 57

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