Class: ArchUnit::GraphReporting::Projection::SnapshotFactory
- Inherits:
-
Object
- Object
- ArchUnit::GraphReporting::Projection::SnapshotFactory
- Defined in:
- lib/archunit/graph/projection/create_snapshot.rb
Overview
Builds the one immutable representation consumed by every graph renderer.
Class Method Summary collapse
Class Method Details
.create(graph, options = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/archunit/graph/projection/create_snapshot.rb', line 18 def create(graph, = nil) validate_graph(graph) = GraphQueryOptions.resolve() query_edges = external_query_edges(graph, ) selected_nodes = NodeSelection.select(query_edges, ) raw_edges = selected_edges(query_edges, selected_nodes, ) report_edges = aggregate_edges(raw_edges, ) report_nodes = build_nodes(selected_nodes, report_edges, .collapse) build_snapshot(, report_nodes, report_edges, raw_edges) end |