Class: ArchUnit::Extraction::ResolvedImport
- Inherits:
-
Data
- Object
- Data
- ArchUnit::Extraction::ResolvedImport
- Defined in:
- lib/archunit/extraction/resolved_import.rb
Instance Attribute Summary collapse
-
#import_kind ⇒ Object
readonly
Returns the value of attribute import_kind.
-
#line_number ⇒ Object
readonly
Returns the value of attribute line_number.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
-
#resolved_path ⇒ Object
readonly
Returns the value of attribute resolved_path.
Instance Method Summary collapse
-
#initialize(module_name:, import_kind:, line_number:, resolved_path: nil) ⇒ ResolvedImport
constructor
A new instance of ResolvedImport.
Constructor Details
#initialize(module_name:, import_kind:, line_number:, resolved_path: nil) ⇒ ResolvedImport
Returns a new instance of ResolvedImport.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/archunit/extraction/resolved_import.rb', line 8 def initialize(module_name:, import_kind:, line_number:, resolved_path: nil) validate_module_name(module_name) validate_import_kind(import_kind) validate_line_number(line_number) validate_resolved_path(resolved_path) module_name = module_name.dup.freeze resolved_path = resolved_path&.tr('\\', '/')&.freeze super end |
Instance Attribute Details
#import_kind ⇒ Object (readonly)
Returns the value of attribute import_kind
7 8 9 |
# File 'lib/archunit/extraction/resolved_import.rb', line 7 def import_kind @import_kind end |
#line_number ⇒ Object (readonly)
Returns the value of attribute line_number
7 8 9 |
# File 'lib/archunit/extraction/resolved_import.rb', line 7 def line_number @line_number end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name
7 8 9 |
# File 'lib/archunit/extraction/resolved_import.rb', line 7 def module_name @module_name end |
#resolved_path ⇒ Object (readonly)
Returns the value of attribute resolved_path
7 8 9 |
# File 'lib/archunit/extraction/resolved_import.rb', line 7 def resolved_path @resolved_path end |