Method: Puppet::Graph::SimpleGraph#matching_edges
- Defined in:
- lib/puppet/graph/simple_graph.rb
#matching_edges(event, base = nil) ⇒ Object
Collect all of the edges that the passed events match. Returns an array of edges.
65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/puppet/graph/simple_graph.rb', line 65 def matching_edges(event, base = nil) source = base || event.resource unless vertex?(source) Puppet.warning _("Got an event from invalid vertex %{source}") % { source: source.ref } return [] end # Get all of the edges that this vertex should forward events # to, which is the same thing as saying all edges directly below # This vertex in the graph. @out_from[source].values.flatten.find_all { |edge| edge.match?(event.name) } end |