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:



71
72
73
74
75
76
77
78
79
# File 'lib/nanoc/core/errors.rb', line 71

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:



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

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



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

def snapshot_name
  @snapshot_name
end