Exception: Nanoc::Core::Errors::UnmetDependency

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

Overview

Error that is raised when an rep cannot be compiled because it depends on other representations.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rep, snapshot_name) ⇒ UnmetDependency

Returns a new instance of UnmetDependency.

Parameters:



64
65
66
67
68
69
# File 'lib/nanoc/core/errors.rb', line 64

def initialize(rep, snapshot_name)
  @rep = rep
  @snapshot_name = snapshot_name

  super("The current item cannot be compiled yet because of an unmet dependency on the “#{rep.item.identifier}” item (rep “#{rep.name}”, snapshot “#{snapshot_name}”).")
end

Instance Attribute Details

#repNanoc::Core::ItemRep (readonly)

Returns The item representation that cannot yet be compiled.

Returns:



57
58
59
# File 'lib/nanoc/core/errors.rb', line 57

def rep
  @rep
end

#snapshot_nameSymbol (readonly)

Returns The name of the snapshot that cannot yet be compiled.

Returns:

  • (Symbol)

    The name of the snapshot that cannot yet be compiled



60
61
62
# File 'lib/nanoc/core/errors.rb', line 60

def snapshot_name
  @snapshot_name
end