Class: ArchUnit::GraphReporting::Projection::GraphReportSummary

Inherits:
Data
  • Object
show all
Defined in:
lib/archunit/graph/projection/graph_report_summary.rb

Overview

Counts describing the selected and aggregated graph snapshot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node_count:, edge_count:, raw_edge_count:, external_edge_count:) ⇒ GraphReportSummary

Returns a new instance of GraphReportSummary.

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
# File 'lib/archunit/graph/projection/graph_report_summary.rb', line 10

def initialize(node_count:, edge_count:, raw_edge_count:, external_edge_count:)
  values = { node_count:, edge_count:, raw_edge_count:, external_edge_count: }
  invalid = values.find { |_name, value| !value.is_a?(Integer) || value.negative? }
  raise ArgumentError, "#{invalid.first} must be a non-negative Integer" if invalid

  super
end

Instance Attribute Details

#edge_countObject (readonly)

Returns the value of attribute edge_count

Returns:

  • (Object)

    the current value of edge_count



7
8
9
# File 'lib/archunit/graph/projection/graph_report_summary.rb', line 7

def edge_count
  @edge_count
end

#external_edge_countObject (readonly)

Returns the value of attribute external_edge_count

Returns:

  • (Object)

    the current value of external_edge_count



7
8
9
# File 'lib/archunit/graph/projection/graph_report_summary.rb', line 7

def external_edge_count
  @external_edge_count
end

#node_countObject (readonly)

Returns the value of attribute node_count

Returns:

  • (Object)

    the current value of node_count



7
8
9
# File 'lib/archunit/graph/projection/graph_report_summary.rb', line 7

def node_count
  @node_count
end

#raw_edge_countObject (readonly)

Returns the value of attribute raw_edge_count

Returns:

  • (Object)

    the current value of raw_edge_count



7
8
9
# File 'lib/archunit/graph/projection/graph_report_summary.rb', line 7

def raw_edge_count
  @raw_edge_count
end