Class: Moult::Confidence::Finding
- Inherits:
-
Struct
- Object
- Struct
- Moult::Confidence::Finding
- Defined in:
- lib/moult/confidence.rb
Overview
A confidence-graded dead-code candidate. Carries its reasons so no claim is ever made without a recorded justification.
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
-
#path ⇒ Object
Returns the value of attribute path.
-
#reasons ⇒ Object
Returns the value of attribute reasons.
-
#runtime ⇒ Object
Returns the value of attribute runtime.
-
#span ⇒ Object
Returns the value of attribute span.
-
#symbol_id ⇒ Object
Returns the value of attribute symbol_id.
Instance Method Summary collapse
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def category @category end |
#confidence ⇒ Object
Returns the value of attribute confidence
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def confidence @confidence end |
#kind ⇒ Object
Returns the value of attribute kind
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def name @name end |
#path ⇒ Object
Returns the value of attribute path
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def path @path end |
#reasons ⇒ Object
Returns the value of attribute reasons
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def reasons @reasons end |
#runtime ⇒ Object
Returns the value of attribute runtime
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def runtime @runtime end |
#span ⇒ Object
Returns the value of attribute span
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def span @span end |
#symbol_id ⇒ Object
Returns the value of attribute symbol_id
54 55 56 |
# File 'lib/moult/confidence.rb', line 54 def symbol_id @symbol_id end |
Instance Method Details
#to_h ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/moult/confidence.rb', line 57 def to_h { symbol_id: symbol_id, kind: kind.to_s, name: name, span: span.to_h, confidence: confidence, category: category, runtime: runtime&.to_s, reasons: reasons.map(&:to_h) } end |