Class: Nanoc::Int::Errors::NoSuchSnapshot Private

Inherits:
Generic
  • Object
show all
Defined in:
lib/nanoc/base/errors.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.

Error that is raised when the compiled content at a non-existing snapshot is requested.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item_rep, snapshot) ⇒ NoSuchSnapshot

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 a new instance of NoSuchSnapshot.

Parameters:

  • item_rep (Nanoc::Int::ItemRep)

    The item rep from which the compiled content was requested

  • snapshot (Symbol)

    The requested snapshot



155
156
157
158
159
# File 'lib/nanoc/base/errors.rb', line 155

def initialize(item_rep, snapshot)
  @item_rep = item_rep
  @snapshot = snapshot
  super("The “#{item_rep.inspect}” item rep does not have a snapshot “#{snapshot.inspect}")
end

Instance Attribute Details

#item_repNanoc::Int::ItemRep (readonly)

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 The item rep from which the compiled content was requested.

Returns:



146
147
148
# File 'lib/nanoc/base/errors.rb', line 146

def item_rep
  @item_rep
end

#snapshotSymbol (readonly)

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 The requested snapshot.

Returns:

  • (Symbol)

    The requested snapshot



149
150
151
# File 'lib/nanoc/base/errors.rb', line 149

def snapshot
  @snapshot
end