class Rake::InvocationChain
InvocationChain
tracks the chain of task invocations to detect circular dependencies.
Constants
- EMPTY
Public Class Methods
Source
# File lib/rake/invocation_chain.rb 27 def self.append(value, chain) 28 chain.append(value) 29 end
Source
# File lib/rake/invocation_chain.rb 7 def initialize(value, tail) 8 @value = value 9 @tail = tail 10 end
Public Instance Methods
Source
# File lib/rake/invocation_chain.rb 16 def append(value) 17 if member?(value) 18 fail RuntimeError, "Circular dependency detected: #{to_s} => #{value}" 19 end 20 self.class.new(value, self) 21 end
Source
# File lib/rake/invocation_chain.rb 12 def member?(obj) 13 @value == obj || @tail.member?(obj) 14 end