Class: Moult::BoundariesReport::Occurrence

Inherits:
Struct
  • Object
show all
Defined in:
lib/moult/boundaries_report.rb

Overview

One referencing site of a violation group. path (root-relative) is the join key into the health files roll-up. symbol_id is the shared method-level join key, but it is NULL in this slice: packwerk's recorded violations are file-keyed (no line numbers), so there is no line to resolve an enclosing method. It is kept (nullable) for contract consistency with the duplication occurrence shape and to stay forward-compatible with line-level offenses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



23
24
25
# File 'lib/moult/boundaries_report.rb', line 23

def path
  @path
end

#symbol_idObject

Returns the value of attribute symbol_id

Returns:

  • (Object)

    the current value of symbol_id



23
24
25
# File 'lib/moult/boundaries_report.rb', line 23

def symbol_id
  @symbol_id
end

Instance Method Details

#to_hObject



24
25
26
# File 'lib/moult/boundaries_report.rb', line 24

def to_h
  {symbol_id: symbol_id, path: path}
end