Class Nanoc::ItemRepRecorderProxy
In: lib/nanoc/base/compilation/item_rep_recorder_proxy.rb
Parent: Object

Represents a fake iem representation that does not actually perform any actual filtering, layouting or snapshotting, but instead keeps track of what would happen if a real item representation would have been used instead. It therefore “records” the actions that happens upon it.

The list of recorded actions is used during compilation to determine whether an item representation needs to be recompiled: if the list of actions is different from the list of actions from the previous compilation run, the item needs to be recompiled; if it is the same, it may not need to be recompiled.

@api private

Methods

content   filter   is_proxy?   layout   new   snapshot  

Attributes

rule_memory  [R]  @example The compilation rule and the corresponding rule memory
    # rule
    compile '/foo/' do
      filter :erb
      filter :myfilter, :arg1 => 'stuff'
      layout 'meh'
    end

    # memory
    [
      [ :filter, :erb, {} ],
      [ :filter, :myfilter, { :arg1 => 'stuff' } ],
      [ :layout, 'meh' ]
    ]

@return [Array] The list of recorded actions (“rule memory”)

Public Class methods

@param [Nanoc::ItemRep] item_rep The item representation that this

  proxy should behave like

Public Instance methods

@return [{}]

Returns true because this item is already a proxy, and therefore doesn’t need to be wrapped anymore.

@return [true]

@see Nanoc::ItemRep#is_proxy? @see Nanoc::ItemRepProxy#is_proxy?

[Validate]