Exception: Nanoc::Errors::NoSuchSnapshot

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

- (NoSuchSnapshot) initialize(item_rep, snapshot)

Returns a new instance of NoSuchSnapshot

Parameters:

  • item_rep (Nanoc::ItemRep)

    The item rep from which the compiled content was requested

  • snapshot (Symbol)

    The requested snapshot



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

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

Instance Attribute Details

- (Nanoc::ItemRep) item_rep (readonly)

Returns The item rep from which the compiled content was requested

Returns:

  • (Nanoc::ItemRep)

    The item rep from which the compiled content was requested



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

def item_rep
  @item_rep
end

- (Symbol) snapshot (readonly)

Returns The requested snapshot

Returns:

  • (Symbol)

    The requested snapshot



151
152
153
# File 'lib/nanoc/base/errors.rb', line 151

def snapshot
  @snapshot
end