Module: ArchUnit::GraphReporting::Projection::NodeSelection
- Defined in:
- lib/archunit/graph/projection/node_selection.rb
Overview
Pure graph traversal for focus, reachability, and dependent queries.
Class Method Summary collapse
Class Method Details
.select(edges, options) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/archunit/graph/projection/node_selection.rb', line 12 def select(edges, ) return all_nodes(edges) unless query?() selected = Set.new selected.merge((edges, .focus, .focus_depth)) if .focus selected.merge(walk(edges, .reachable_from, :outgoing)) if .reachable_from selected.merge(walk(edges, .dependents_of, :incoming)) if .dependents_of selected end |