Exception: Nanoc::Core::Errors::NoSuchSnapshot
- Inherits:
-
Nanoc::Core::Error
- Object
- StandardError
- Nanoc::Core::Error
- Nanoc::Core::Errors::NoSuchSnapshot
- 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
-
#item_rep ⇒ Nanoc::Core::ItemRep
readonly
The item rep from which the compiled content was requested.
-
#snapshot ⇒ Symbol
readonly
The requested snapshot.
Instance Method Summary collapse
-
#initialize(item_rep, snapshot) ⇒ NoSuchSnapshot
constructor
A new instance of NoSuchSnapshot.
Constructor Details
#initialize(item_rep, snapshot) ⇒ NoSuchSnapshot
Returns a new instance of NoSuchSnapshot.
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_rep ⇒ Nanoc::Core::ItemRep (readonly)
Returns The item rep from which the compiled content was requested.
11 12 13 |
# File 'lib/nanoc/core/errors.rb', line 11 def item_rep @item_rep end |
#snapshot ⇒ Symbol (readonly)
Returns The requested snapshot.
14 15 16 |
# File 'lib/nanoc/core/errors.rb', line 14 def snapshot @snapshot end |