class Bundler::Molinillo::DependencyGraph

def add_child_vertex(name, payload, parent_names, requirement)

Returns:
  • (void) -

Parameters:
  • requirement (Object) -- the requirement that is requiring the child
  • parent_names (Array) --
  • payload (Object) --
  • name (String) --
def add_child_vertex(name, payload, parent_names, requirement)
  is_root = parent_names.include?(nil)
  parent_nodes = parent_names.compact.map { |n| vertex_named(n) }
  vertex = vertex_named(name) || if is_root
                                   add_root_vertex(name, payload)
                                 else
                                   add_vertex(name, payload)
                                 end
  vertex.payload ||= payload
  parent_nodes.each do |parent_node|
    add_edge(parent_node, vertex, requirement)
  end
  vertex
end