diff options
| author | Luke Kanies <luke@madstop.com> | 2008-02-11 18:27:49 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2008-02-11 18:27:49 -0600 |
| commit | 8b2fae019b31513becd002eb474e1b4803abde24 (patch) | |
| tree | 92312a50927ff65a8b78fbec7fff52d3bf59eb78 /lib/puppet/simple_graph.rb | |
| parent | cf21ade9abf4541920b535b0e2643b30e44b067b (diff) | |
| download | puppet-8b2fae019b31513becd002eb474e1b4803abde24.tar.gz puppet-8b2fae019b31513becd002eb474e1b4803abde24.tar.xz puppet-8b2fae019b31513becd002eb474e1b4803abde24.zip | |
Removing the last remaining vestiges of GRATR --
removing the bangs from 'add_vertex!' and 'add_edge!'.
Diffstat (limited to 'lib/puppet/simple_graph.rb')
| -rw-r--r-- | lib/puppet/simple_graph.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/puppet/simple_graph.rb b/lib/puppet/simple_graph.rb index 11542ad53..503e4814c 100644 --- a/lib/puppet/simple_graph.rb +++ b/lib/puppet/simple_graph.rb @@ -100,10 +100,10 @@ class Puppet::SimpleGraph # Return a reversed version of this graph. def reversal result = self.class.new - vertices.each { |vertex| result.add_vertex!(vertex) } + vertices.each { |vertex| result.add_vertex(vertex) } edges.each do |edge| newedge = edge.class.new(edge.target, edge.source, edge.label) - result.add_edge!(newedge) + result.add_edge(newedge) end result end @@ -150,7 +150,7 @@ class Puppet::SimpleGraph end # Add a new vertex to the graph. - def add_vertex!(vertex) + def add_vertex(vertex) return false if vertex?(vertex) setup_vertex(vertex) true # don't return the VertexWrapper instance. @@ -176,7 +176,7 @@ class Puppet::SimpleGraph # Add a new edge. The graph user has to create the edge instance, # since they have to specify what kind of edge it is. - def add_edge!(source, target = nil, label = nil) + def add_edge(source, target = nil, label = nil) if target edge = Puppet::Relationship.new(source, target, label) else |
