Exception: Coradoc::CircularIncludeError
- Defined in:
- lib/coradoc/errors.rb
Overview
Error raised when a cycle is detected in the include graph. The chain is the list of files leading back to the repeated target.
Instance Attribute Summary collapse
-
#chain ⇒ Object
readonly
Returns the value of attribute chain.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target:, chain:) ⇒ CircularIncludeError
constructor
A new instance of CircularIncludeError.
Constructor Details
#initialize(target:, chain:) ⇒ CircularIncludeError
Returns a new instance of CircularIncludeError.
314 315 316 317 318 |
# File 'lib/coradoc/errors.rb', line 314 def initialize(target:, chain:) @target = target @chain = chain super("Circular include detected: #{chain.join(' -> ')} -> #{target}") end |
Instance Attribute Details
#chain ⇒ Object (readonly)
Returns the value of attribute chain.
312 313 314 |
# File 'lib/coradoc/errors.rb', line 312 def chain @chain end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
312 313 314 |
# File 'lib/coradoc/errors.rb', line 312 def target @target end |