Class: ArchSpec::SourceFile
- Inherits:
-
Object
- Object
- ArchSpec::SourceFile
- Defined in:
- lib/archspec/model.rb
Instance Attribute Summary collapse
-
#expected_constant ⇒ Object
readonly
Returns the value of attribute expected_constant.
-
#parse_errors ⇒ Object
readonly
Returns the value of attribute parse_errors.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#relative_path ⇒ Object
readonly
Returns the value of attribute relative_path.
-
#suppressions ⇒ Object
readonly
Returns the value of attribute suppressions.
Instance Method Summary collapse
-
#initialize(root:, path:, expected_constant:, parse_errors:, suppressions:) ⇒ SourceFile
constructor
A new instance of SourceFile.
Constructor Details
#initialize(root:, path:, expected_constant:, parse_errors:, suppressions:) ⇒ SourceFile
Returns a new instance of SourceFile.
19 20 21 22 23 24 25 |
# File 'lib/archspec/model.rb', line 19 def initialize(root:, path:, expected_constant:, parse_errors:, suppressions:) @path = path @relative_path = Pathname(path).relative_path_from(Pathname(root)).to_s @expected_constant = expected_constant @parse_errors = parse_errors @suppressions = suppressions end |
Instance Attribute Details
#expected_constant ⇒ Object (readonly)
Returns the value of attribute expected_constant.
17 18 19 |
# File 'lib/archspec/model.rb', line 17 def expected_constant @expected_constant end |
#parse_errors ⇒ Object (readonly)
Returns the value of attribute parse_errors.
17 18 19 |
# File 'lib/archspec/model.rb', line 17 def parse_errors @parse_errors end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
17 18 19 |
# File 'lib/archspec/model.rb', line 17 def path @path end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
17 18 19 |
# File 'lib/archspec/model.rb', line 17 def relative_path @relative_path end |
#suppressions ⇒ Object (readonly)
Returns the value of attribute suppressions.
17 18 19 |
# File 'lib/archspec/model.rb', line 17 def suppressions @suppressions end |