class Gem::Resolver::Molinillo::DependencyGraph::DeleteEdge
(see DependencyGraph#delete_edge)
@!visibility private
def self.action_name
def self.action_name :delete_edge end
def down(graph)
def down(graph) edge = make_edge(graph) edge.origin.outgoing_edges << edge edge.destination.incoming_edges << edge edge end
def initialize(origin_name, destination_name, requirement)
-
requirement
(Object
) -- the requirement that the edge represents -
destination_name
(String
) -- the name of the destination of the edge -
origin_name
(String
) -- the name of the origin of the edge
def initialize(origin_name, destination_name, requirement) @origin_name = origin_name @destination_name = destination_name @requirement = requirement end
def make_edge(graph)
-
(Edge)
- The edge this action adds
Parameters:
-
graph
(DependencyGraph
) -- the graph to find vertices from
def make_edge(graph) Edge.new( graph.vertex_named(origin_name), graph.vertex_named(destination_name), requirement ) end
def up(graph)
def up(graph) edge = make_edge(graph) edge.origin.outgoing_edges.delete(edge) edge.destination.incoming_edges.delete(edge) end