Class: ArchSpec::SourceFile

Inherits:
Object
  • Object
show all
Defined in:
lib/archspec/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_errorsObject (readonly)

Returns the value of attribute parse_errors.



61
62
63
# File 'lib/archspec/model.rb', line 61

def parse_errors
  @parse_errors
end

#pathObject (readonly)

Returns the value of attribute path.



61
62
63
# File 'lib/archspec/model.rb', line 61

def path
  @path
end

#relative_pathObject (readonly)

Returns the value of attribute relative_path.



61
62
63
# File 'lib/archspec/model.rb', line 61

def relative_path
  @relative_path
end

#suppressionsObject (readonly)

Returns the value of attribute suppressions.



61
62
63
# File 'lib/archspec/model.rb', line 61

def suppressions
  @suppressions
end