class Bundler::Molinillo::DependencyGraph::DeleteEdge

(see DependencyGraph#delete_edge)
@!visibility private

def self.action_name

(see Action.action_name)
def self.action_name
  :delete_edge
end

def down(graph)

(see Action#down)
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)

Parameters:
  • 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)

Returns:
  • (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)

(see Action#up)
def up(graph)
  edge = make_edge(graph)
  edge.origin.outgoing_edges.delete(edge)
  edge.destination.incoming_edges.delete(edge)
end