Method: Puppet::Graph::SimpleGraph#adjacent

Defined in:
lib/puppet/graph/simple_graph.rb

#adjacent(v, options = {}) ⇒ Object

Find adjacent edges.



349
350
351
352
353
354
# File 'lib/puppet/graph/simple_graph.rb', line 349

def adjacent(v, options = {})
  ns = (options[:direction] == :in) ? @in_to[v] : @out_from[v]
  return [] unless ns

  (options[:type] == :edges) ? ns.values.flatten : ns.keys
end