Class: ArchUnit::Common::Extraction::DependencyEvidence
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Common::Extraction::DependencyEvidence
- Defined in:
- lib/archunit/common/extraction/dependency_evidence.rb
Overview
Source-level support for a file dependency, without implying runtime execution.
Instance Attribute Summary collapse
-
#end_line ⇒ Object
readonly
Returns the value of attribute end_line.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target_line_number ⇒ Object
readonly
Returns the value of attribute target_line_number.
Instance Method Summary collapse
-
#initialize(source:, kind:, name:, line_number:, end_line: line_number, target_line_number: nil) ⇒ DependencyEvidence
constructor
Keywords mirror this immutable source span.
Constructor Details
#initialize(source:, kind:, name:, line_number:, end_line: line_number, target_line_number: nil) ⇒ DependencyEvidence
Keywords mirror this immutable source span.
13 14 15 16 17 18 19 20 21 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 13 def initialize( # rubocop:disable Metrics/ParameterLists source:, kind:, name:, line_number:, end_line: line_number, target_line_number: nil ) validate_identity(source, kind, name) validate_lines(line_number, end_line, target_line_number) source = source.tr('\\', '/').freeze name = name.dup.freeze super end |
Instance Attribute Details
#end_line ⇒ Object (readonly)
Returns the value of attribute end_line
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def end_line @end_line end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def kind @kind end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def line_number @line_number end |
#name ⇒ Object (readonly)
Returns the value of attribute name
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def name @name end |
#source ⇒ Object (readonly)
Returns the value of attribute source
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def source @source end |
#target_line_number ⇒ Object (readonly)
Returns the value of attribute target_line_number
9 10 11 |
# File 'lib/archunit/common/extraction/dependency_evidence.rb', line 9 def target_line_number @target_line_number end |
ArchUnitRuby