Class: Mementus::Pipes::Incoming
- Inherits:
-
Object
- Object
- Mementus::Pipes::Incoming
- Defined in:
- lib/mementus/pipes/incoming.rb
Instance Method Summary collapse
Instance Method Details
#process(graph, node) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/mementus/pipes/incoming.rb', line 4 def process(graph, node) incoming = [] graph.each_node do |graph_node| graph.each_adjacent(graph_node.id) do |adj_node| incoming << graph_node if adj_node.id == node.id end end incoming end |