Class: MetzScan::Analyzers::SubclassOverridePressure::Finding
- Inherits:
-
Struct
- Object
- Struct
- MetzScan::Analyzers::SubclassOverridePressure::Finding
- Defined in:
- lib/metz_scan/analyzers/subclass_override_pressure/finding.rb
Instance Attribute Summary collapse
-
#base_name ⇒ Object
Returns the value of attribute base_name.
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#descendant_count ⇒ Object
Returns the value of attribute descendant_count.
-
#message ⇒ Object
Returns the value of attribute message.
-
#method_identity ⇒ Object
Returns the value of attribute method_identity.
-
#method_name ⇒ Object
Returns the value of attribute method_name.
-
#occurrences ⇒ Object
Returns the value of attribute occurrences.
-
#overriding_descendants ⇒ Object
Returns the value of attribute overriding_descendants.
-
#project_analyzer_metadata ⇒ Object
Returns the value of attribute project_analyzer_metadata.
-
#project_analyzer_status ⇒ Object
Returns the value of attribute project_analyzer_status.
-
#receiver_kind ⇒ Object
Returns the value of attribute receiver_kind.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
-
#source ⇒ Object
Returns the value of attribute source.
-
#suggested_next_moves ⇒ Object
Returns the value of attribute suggested_next_moves.
-
#triage_severity ⇒ Object
Returns the value of attribute triage_severity.
-
#triage_summary ⇒ Object
Returns the value of attribute triage_summary.
-
#why_it_matters ⇒ Object
Returns the value of attribute why_it_matters.
Instance Method Summary collapse
- #method_separator(occurrence) ⇒ Object
- #occurrence_context(occurrence) ⇒ Object
- #report_occurrences ⇒ Object
Instance Attribute Details
#base_name ⇒ Object
Returns the value of attribute base_name
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def base_name @base_name end |
#confidence ⇒ Object
Returns the value of attribute confidence
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def confidence @confidence end |
#descendant_count ⇒ Object
Returns the value of attribute descendant_count
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def descendant_count @descendant_count end |
#message ⇒ Object
Returns the value of attribute message
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def @message end |
#method_identity ⇒ Object
Returns the value of attribute method_identity
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def method_identity @method_identity end |
#method_name ⇒ Object
Returns the value of attribute method_name
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def method_name @method_name end |
#occurrences ⇒ Object
Returns the value of attribute occurrences
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def occurrences @occurrences end |
#overriding_descendants ⇒ Object
Returns the value of attribute overriding_descendants
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def overriding_descendants @overriding_descendants end |
#project_analyzer_metadata ⇒ Object
Returns the value of attribute project_analyzer_metadata
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def @project_analyzer_metadata end |
#project_analyzer_status ⇒ Object
Returns the value of attribute project_analyzer_status
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def project_analyzer_status @project_analyzer_status end |
#receiver_kind ⇒ Object
Returns the value of attribute receiver_kind
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def receiver_kind @receiver_kind end |
#rule_id ⇒ Object
Returns the value of attribute rule_id
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def rule_id @rule_id end |
#source ⇒ Object
Returns the value of attribute source
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def source @source end |
#suggested_next_moves ⇒ Object
Returns the value of attribute suggested_next_moves
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def suggested_next_moves @suggested_next_moves end |
#triage_severity ⇒ Object
Returns the value of attribute triage_severity
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def triage_severity @triage_severity end |
#triage_summary ⇒ Object
Returns the value of attribute triage_summary
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def triage_summary @triage_summary end |
#why_it_matters ⇒ Object
Returns the value of attribute why_it_matters
8 9 10 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 8 def why_it_matters @why_it_matters end |
Instance Method Details
#method_separator(occurrence) ⇒ Object
22 23 24 25 26 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 22 def method_separator(occurrence) return "#" unless occurrence.respond_to?(:receiver_kind) occurrence.receiver_kind == "singleton" ? "." : "#" end |
#occurrence_context(occurrence) ⇒ Object
18 19 20 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 18 def occurrence_context(occurrence) "#{occurrence&.owner_name}#{method_separator(occurrence)}#{method_name}" end |
#report_occurrences ⇒ Object
13 14 15 16 |
# File 'lib/metz_scan/analyzers/subclass_override_pressure/finding.rb', line 13 def report_occurrences occurrence = occurrences.first [Occurrence.from(occurrence, context: occurrence_context(occurrence))].compact end |