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:



39
40
41
42
43
44
# File 'lib/nanoc/core/errors.rb', line 39

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:



32
33
34
# File 'lib/nanoc/core/errors.rb', line 32

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



35
36
37
# File 'lib/nanoc/core/errors.rb', line 35

def snapshot_name
  @snapshot_name
end