class ActionView::Digestor::Node

def self.create(name, logical_name, template, partial)

def self.create(name, logical_name, template, partial)
  klass = partial ? Partial : Node
  klass.new(name, logical_name, template, [])
end

def dependency_digest(finder, stack)

def dependency_digest(finder, stack)
  children.map do |node|
    if stack.include?(node)
      false
    else
      finder.digest_cache[node.name] ||= begin
                                           stack.push node
                                           node.digest(finder, stack).tap { stack.pop }
                                         end
    end
  end.join("-")
end

def digest(finder, stack = [])

def digest(finder, stack = [])
  ActiveSupport::Digest.hexdigest("#{template.source}-#{dependency_digest(finder, stack)}")
end

def initialize(name, logical_name, template, children = [])

def initialize(name, logical_name, template, children = [])
  @name         = name
  @logical_name = logical_name
  @template     = template
  @children     = children
end

def to_dep_map

def to_dep_map
  children.any? ? { name => children.map(&:to_dep_map) } : name
end