Class | Rake::InvocationChain
In: | lib/rake.rb
Parent: | Object

InvocationChain tracks the chain of task invocations to detect circular dependencies.

### Methods

append append member? new to_s

### Classes and Modules

Class Rake::InvocationChain::EmptyInvocationChain

### Constants

EMPTY | = | EmptyInvocationChain.new

### Public Class methods

append(value, chain)

[Source]

         # File lib/rake.rb, line 411
    411:     def self.append(value, chain)
    412:       chain.append(value)
    413:     end

new(value, tail)

[Source]

         # File lib/rake.rb, line 391
    391:     def initialize(value, tail)
    392:       @value = value
    393:       @tail = tail
    394:     end

### Public Instance methods

append(value)

[Source]

         # File lib/rake.rb, line 400
    400:     def append(value)
    401:       if member?(value)
    402:         fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}"
    403:       end
    404:       self.class.new(value, self)
    405:     end

member?(obj)

[Source]

         # File lib/rake.rb, line 396
    396:     def member?(obj)
    397:       @value == obj || @tail.member?(obj)
    398:     end

to_s()

[Source]

         # File lib/rake.rb, line 407
    407:     def to_s
    408:       "#{prefix}#{@value}"
    409:     end

[Validate]