Class: ArchUnit::GraphReporting::Projection::GraphReportEdge

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

Overview

Aggregated dependency evidence in a graph report snapshot.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source:, target:, count:, external:, import_kinds: [], evidence: []) ⇒ GraphReportEdge

Keywords mirror this immutable report value.



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 13

def initialize( # rubocop:disable Metrics/ParameterLists
  source:, target:, count:, external:, import_kinds: [], evidence: []
)
  source = immutable_string(source, :source)
  target = immutable_string(target, :target)
  validate_count(count)
  validate_external(external)
  import_kinds = immutable_import_kinds(import_kinds)
  evidence = Array(evidence).uniq.freeze
  unless evidence.all?(Common::Extraction::DependencyEvidence)
    raise ArgumentError, 'evidence must contain DependencyEvidence values'
  end

  super
end

Instance Attribute Details

#count ⇒ Object (readonly)

Returns the value of attribute count

Returns:

  • (Object) —

    the current value of count



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def count
  @count
end

#evidence ⇒ Object (readonly)

Returns the value of attribute evidence

Returns:

  • (Object) —

    the current value of evidence



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def evidence
  @evidence
end

#external ⇒ Object (readonly)

Returns the value of attribute external

Returns:

  • (Object) —

    the current value of external



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def external
  @external
end

#import_kinds ⇒ Object (readonly)

Returns the value of attribute import_kinds

Returns:

  • (Object) —

    the current value of import_kinds



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def import_kinds
  @import_kinds
end

#source ⇒ Object (readonly)

Returns the value of attribute source

Returns:

  • (Object) —

    the current value of source



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def source
  @source
end

#target ⇒ Object (readonly)

Returns the value of attribute target

Returns:

  • (Object) —

    the current value of target



10
11
12
# File 'lib/archunit/graph/projection/graph_report_edge.rb', line 10

def target
  @target
end