InvocationChain tracks the chain of task invocations to detect circular dependencies.
Methods
Classes and Modules
Class Rake::InvocationChain::EmptyInvocationChainConstants
EMPTY | = | EmptyInvocationChain.new |
Public Class methods
[ show source ]
# File lib/rake.rb, line 430 430: def self.append(value, chain) 431: chain.append(value) 432: end
[ show source ]
# File lib/rake.rb, line 410 410: def initialize(value, tail) 411: @value = value 412: @tail = tail 413: end
Public Instance methods
[ show source ]
# File lib/rake.rb, line 419 419: def append(value) 420: if member?(value) 421: fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}" 422: end 423: self.class.new(value, self) 424: end
[ show source ]
# File lib/rake.rb, line 415 415: def member?(obj) 416: @value == obj || @tail.member?(obj) 417: end
[ show source ]
# File lib/rake.rb, line 426 426: def to_s 427: "#{prefix}#{@value}" 428: end