Class: MetzScan::Analyzers::InheritanceDescendants::Finding

Inherits:
Struct
  • Object
show all
Defined in:
lib/metz_scan/analyzers/inheritance_descendants/finding.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_nameObject

Returns the value of attribute base_name

Returns:

  • (Object)

    the current value of base_name



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def base_name
  @base_name
end

#confidenceObject

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def confidence
  @confidence
end

#descendantsObject

Returns the value of attribute descendants

Returns:

  • (Object)

    the current value of descendants



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def descendants
  @descendants
end

#locationsObject

Returns the value of attribute locations

Returns:

  • (Object)

    the current value of locations



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def locations
  @locations
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def message
  @message
end

#primary_locationObject

Returns the value of attribute primary_location

Returns:

  • (Object)

    the current value of primary_location



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def primary_location
  @primary_location
end

#project_analyzer_metadataObject

Returns the value of attribute project_analyzer_metadata

Returns:

  • (Object)

    the current value of project_analyzer_metadata



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def 
  @project_analyzer_metadata
end

#project_analyzer_statusObject

Returns the value of attribute project_analyzer_status

Returns:

  • (Object)

    the current value of project_analyzer_status



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def project_analyzer_status
  @project_analyzer_status
end

#rule_idObject

Returns the value of attribute rule_id

Returns:

  • (Object)

    the current value of rule_id



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def rule_id
  @rule_id
end

#sourceObject

Returns the value of attribute source

Returns:

  • (Object)

    the current value of source



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def source
  @source
end

#suggested_next_movesObject

Returns the value of attribute suggested_next_moves

Returns:

  • (Object)

    the current value of suggested_next_moves



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def suggested_next_moves
  @suggested_next_moves
end

#triage_severityObject

Returns the value of attribute triage_severity

Returns:

  • (Object)

    the current value of triage_severity



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def triage_severity
  @triage_severity
end

#triage_summaryObject

Returns the value of attribute triage_summary

Returns:

  • (Object)

    the current value of triage_summary



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def triage_summary
  @triage_summary
end

#why_it_mattersObject

Returns the value of attribute why_it_matters

Returns:

  • (Object)

    the current value of why_it_matters



6
7
8
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 6

def why_it_matters
  @why_it_matters
end

Instance Method Details

#occurrencesObject



9
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 9

def occurrences = [primary_location].compact

#report_occurrencesObject



11
12
13
# File 'lib/metz_scan/analyzers/inheritance_descendants/finding.rb', line 11

def report_occurrences
  occurrences.map { |occurrence| Occurrence.from(occurrence, context: base_name) }
end