Class: ArchUnit::GraphReporting::Projection::GraphReportSnapshot
- Inherits:
-
Data
- Object
- Data
- ArchUnit::GraphReporting::Projection::GraphReportSnapshot
- Defined in:
- lib/archunit/graph/projection/graph_report_snapshot.rb
Overview
Immutable graph after filtering, collapsing, aggregation, and counting.
Instance Attribute Summary collapse
-
#edges ⇒ Object
readonly
Returns the value of attribute edges.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(title:, nodes:, edges:, summary:) ⇒ GraphReportSnapshot
constructor
A new instance of GraphReportSnapshot.
Constructor Details
#initialize(title:, nodes:, edges:, summary:) ⇒ GraphReportSnapshot
Returns a new instance of GraphReportSnapshot.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/archunit/graph/projection/graph_report_snapshot.rb', line 12 def initialize(title:, nodes:, edges:, summary:) title = immutable_title(title) nodes = immutable_values(nodes, GraphReportNode, :nodes) edges = immutable_values(edges, GraphReportEdge, :edges) unless summary.is_a?(GraphReportSummary) raise ArgumentError, 'summary must be a GraphReportSummary' end super end |
Instance Attribute Details
#edges ⇒ Object (readonly)
Returns the value of attribute edges
11 12 13 |
# File 'lib/archunit/graph/projection/graph_report_snapshot.rb', line 11 def edges @edges end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes
11 12 13 |
# File 'lib/archunit/graph/projection/graph_report_snapshot.rb', line 11 def nodes @nodes end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary
11 12 13 |
# File 'lib/archunit/graph/projection/graph_report_snapshot.rb', line 11 def summary @summary end |
#title ⇒ Object (readonly)
Returns the value of attribute title
11 12 13 |
# File 'lib/archunit/graph/projection/graph_report_snapshot.rb', line 11 def title @title end |