Class: ArchSpec::SourceFile
- Inherits:
-
Object
- Object
- ArchSpec::SourceFile
- Defined in:
- lib/archspec/model.rb
Instance Attribute Summary collapse
-
#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:, parse_errors:, suppressions:) ⇒ SourceFile
constructor
A new instance of SourceFile.
Constructor Details
#initialize(root:, path:, parse_errors:, suppressions:) ⇒ SourceFile
Returns a new instance of SourceFile.
63 64 65 66 67 68 |
# File 'lib/archspec/model.rb', line 63 def initialize(root:, path:, parse_errors:, suppressions:) @path = path @relative_path = Pathname(path).relative_path_from(Pathname(root)).to_s @parse_errors = parse_errors @suppressions = suppressions end |
Instance Attribute Details
#parse_errors ⇒ Object (readonly)
Returns the value of attribute parse_errors.
61 62 63 |
# File 'lib/archspec/model.rb', line 61 def parse_errors @parse_errors end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
61 62 63 |
# File 'lib/archspec/model.rb', line 61 def path @path end |
#relative_path ⇒ Object (readonly)
Returns the value of attribute relative_path.
61 62 63 |
# File 'lib/archspec/model.rb', line 61 def relative_path @relative_path end |
#suppressions ⇒ Object (readonly)
Returns the value of attribute suppressions.
61 62 63 |
# File 'lib/archspec/model.rb', line 61 def suppressions @suppressions end |