Class: ArchUnit::Common::Extraction::Edge
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Common::Extraction::Edge
- Defined in:
- lib/archunit/common/extraction/edge.rb
Instance Attribute Summary collapse
-
#evidence ⇒ Object
readonly
Returns the value of attribute evidence.
-
#external ⇒ Object
readonly
Returns the value of attribute external.
-
#import_kinds ⇒ Object
readonly
Returns the value of attribute import_kinds.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(source:, target:, external:, import_kinds: [], evidence: []) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(source:, target:, external:, import_kinds: [], evidence: []) ⇒ Edge
Returns a new instance of Edge.
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/archunit/common/extraction/edge.rb', line 10 def initialize(source:, target:, external:, import_kinds: [], evidence: []) source = immutable_identifier(source, :source) target = immutable_identifier(target, :target) validate_external(external) import_kinds = immutable_import_kinds(import_kinds) evidence = Array(evidence).uniq.freeze unless evidence.all?(DependencyEvidence) raise ArgumentError, 'evidence must contain DependencyEvidence values' end super end |
Instance Attribute Details
#evidence ⇒ Object (readonly)
Returns the value of attribute evidence
9 10 11 |
# File 'lib/archunit/common/extraction/edge.rb', line 9 def evidence @evidence end |
#external ⇒ Object (readonly)
Returns the value of attribute external
9 10 11 |
# File 'lib/archunit/common/extraction/edge.rb', line 9 def external @external end |
#import_kinds ⇒ Object (readonly)
Returns the value of attribute import_kinds
9 10 11 |
# File 'lib/archunit/common/extraction/edge.rb', line 9 def import_kinds @import_kinds end |
#source ⇒ Object (readonly)
Returns the value of attribute source
9 10 11 |
# File 'lib/archunit/common/extraction/edge.rb', line 9 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target
9 10 11 |
# File 'lib/archunit/common/extraction/edge.rb', line 9 def target @target end |
ArchUnitRuby