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 411 411: def self.append(value, chain) 412: chain.append(value) 413: end
[ show source ]
# File lib/rake.rb, line 391 391: def initialize(value, tail) 392: @value = value 393: @tail = tail 394: end
Public Instance methods
[ show 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
[ show source ]
# File lib/rake.rb, line 396 396: def member?(obj) 397: @value == obj || @tail.member?(obj) 398: end
[ show source ]
# File lib/rake.rb, line 407 407: def to_s 408: "#{prefix}#{@value}" 409: end