Class: ArchUnit::Metrics::Extraction::DistanceInfo
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Metrics::Extraction::DistanceInfo
- Defined in:
- lib/archunit/metrics/extraction/distance_info.rb
Overview
One source file enriched with project-level dependency coupling.
Instance Attribute Summary collapse
-
#afferent_coupling ⇒ Object
readonly
Returns the value of attribute afferent_coupling.
-
#efferent_coupling ⇒ Object
readonly
Returns the value of attribute efferent_coupling.
-
#file_info ⇒ Object
readonly
Returns the value of attribute file_info.
-
#project_file_count ⇒ Object
readonly
Returns the value of attribute project_file_count.
Instance Method Summary collapse
- #abstract_type_count ⇒ Object
- #identifier ⇒ Object
-
#initialize(file_info:, afferent_coupling:, efferent_coupling:, project_file_count:) ⇒ DistanceInfo
constructor
A new instance of DistanceInfo.
- #lines_of_code ⇒ Object
- #path ⇒ Object
- #type_count ⇒ Object
Constructor Details
#initialize(file_info:, afferent_coupling:, efferent_coupling:, project_file_count:) ⇒ DistanceInfo
Returns a new instance of DistanceInfo.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 14 def initialize( file_info:, afferent_coupling:, efferent_coupling:, project_file_count: ) raise ArgumentError, 'file_info must be a FileInfo value' unless file_info.is_a?(FileInfo) project_file_count = positive_integer(project_file_count, :project_file_count) afferent_coupling = coupling_value( afferent_coupling, :afferent_coupling, project_file_count ) efferent_coupling = coupling_value( efferent_coupling, :efferent_coupling, project_file_count ) super end |
Instance Attribute Details
#afferent_coupling ⇒ Object (readonly)
Returns the value of attribute afferent_coupling
9 10 11 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 9 def afferent_coupling @afferent_coupling end |
#efferent_coupling ⇒ Object (readonly)
Returns the value of attribute efferent_coupling
9 10 11 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 9 def efferent_coupling @efferent_coupling end |
#file_info ⇒ Object (readonly)
Returns the value of attribute file_info
9 10 11 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 9 def file_info @file_info end |
#project_file_count ⇒ Object (readonly)
Returns the value of attribute project_file_count
9 10 11 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 9 def project_file_count @project_file_count end |
Instance Method Details
#abstract_type_count ⇒ Object
41 42 43 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 41 def abstract_type_count file_info.abstract_type_count end |
#identifier ⇒ Object
29 30 31 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 29 def identifier file_info.identifier end |
#lines_of_code ⇒ Object
45 46 47 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 45 def lines_of_code file_info.lines_of_code end |
#path ⇒ Object
33 34 35 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 33 def path file_info.path end |
#type_count ⇒ Object
37 38 39 |
# File 'lib/archunit/metrics/extraction/distance_info.rb', line 37 def type_count file_info.type_count end |