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 369
    369:     def self.append(value, chain)
    370:       chain.append(value)
    371:     end

new(value, tail)

[Source]

         # File lib/rake.rb, line 349
    349:     def initialize(value, tail)
    350:       @value = value
    351:       @tail = tail
    352:     end

### Public Instance methods

append(value)

[Source]

         # File lib/rake.rb, line 358
    358:     def append(value)
    359:       if member?(value)
    360:         fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}"
    361:       end
    362:       self.class.new(value, self)
    363:     end

member?(obj)

[Source]

         # File lib/rake.rb, line 354
    354:     def member?(obj)
    355:       @value == obj || @tail.member?(obj)
    356:     end

to_s()

[Source]

         # File lib/rake.rb, line 365
    365:     def to_s
    366:       "#{prefix}#{@value}"
    367:     end

[Validate]