Exception: Nanoc::Core::Errors::NoSuchSnapshot

Inherits:
Nanoc::Core::Error show all
Defined in:
lib/nanoc/core/errors.rb

Overview

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

Returns a new instance of NoSuchSnapshot.

Parameters:

  • item_rep (Nanoc::Core::ItemRep)

    The item rep from which the compiled content was requested

  • snapshot (Symbol)

    The requested snapshot



20
21
22
23
24
# File 'lib/nanoc/core/errors.rb', line 20

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::Core::ItemRep (readonly)

Returns The item rep from which the compiled content was requested.

Returns:



11
12
13
# File 'lib/nanoc/core/errors.rb', line 11

def item_rep
  @item_rep
end

#snapshotSymbol (readonly)

Returns The requested snapshot.

Returns:

  • (Symbol)

    The requested snapshot



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

def snapshot
  @snapshot
end