Class Rake::InvocationChain
|
|
InvocationChain tracks the chain of task
invocations to detect circular dependencies.
Class
Rake::InvocationChain::EmptyInvocationChain
411: def self.append(value, chain)
412: chain.append(value)
413: end
391: def initialize(value, tail)
392: @value = value
393: @tail = tail
394: end
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
396: def member?(obj)
397: @value == obj || @tail.member?(obj)
398: end
407: def to_s
408: "#{prefix}#{@value}"
409: end