lib/nanoc/base/directed_graph.rb in nanoc-3.8.0 vs lib/nanoc/base/directed_graph.rb in nanoc-4.0.0a1

- old
+ new

@@ -1,15 +1,15 @@ # encoding: utf-8 -module Nanoc +module Nanoc::Int # Represents a directed graph. It is used by the dependency tracker for # storing and querying dependencies between items. # # @example Creating and using a directed graph # # # Create a graph with three vertices - # graph = Nanoc::DirectedGraph.new(%w( a b c d )) + # graph = Nanoc::Int::DirectedGraph.new(%w( a b c d )) # # # Add edges # graph.add_edge('a', 'b') # graph.add_edge('b', 'c') # graph.add_edge('c', 'd') @@ -26,10 +26,12 @@ # # Get (direct) predecessors again # graph.direct_predecessors_of('d').sort # # => %w( c ) # graph.predecessors_of('d').sort # # => %w( b c ) + # + # @api private class DirectedGraph # @group Creating a graph # Creates a new directed graph with the given vertices. def initialize(vertices) @@ -220,16 +222,9 @@ # @return [Set] The set of all root vertices in this graph. # # @since 3.2.0 def roots @roots - end - - # @group Deprecated methods - - # @deprecated Use {#delete_edge} instead - def remove_edge(from, to) - delete_edge(from, to) end private # Invalidates cached data. This method should be called when the internal