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

[Source]

     # File lib/rake.rb, line 369
369:     def self.append(value, chain)
370:       chain.append(value)
371:     end

[Source]

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

Public Instance methods

[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

[Source]

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

[Source]

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

[Validate]