Method: Puppet::Graph::SimpleGraph#leaves
- Defined in:
- lib/puppet/graph/simple_graph.rb
#leaves(vertex, direction = :out) ⇒ Object
Determine all of the leaf nodes below a given vertex.
59 60 61 |
# File 'lib/puppet/graph/simple_graph.rb', line 59 def leaves(vertex, direction = :out) tree_from_vertex(vertex, direction).keys.find_all { |c| adjacent(c, :direction => direction).empty? } end |