Class: Moult::DuplicationReport::Finding
- Inherits:
-
Struct
- Object
- Struct
- Moult::DuplicationReport::Finding
- Defined in:
- lib/moult/duplication_report.rb
Overview
A confidence-graded clone group. Carries its reasons so no claim is made without a recorded justification.
Instance Attribute Summary collapse
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#mass ⇒ Object
Returns the value of attribute mass.
-
#node_type ⇒ Object
Returns the value of attribute node_type.
-
#occurrences ⇒ Object
Returns the value of attribute occurrences.
-
#reasons ⇒ Object
Returns the value of attribute reasons.
Instance Method Summary collapse
Instance Attribute Details
#confidence ⇒ Object
Returns the value of attribute confidence
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def confidence @confidence end |
#kind ⇒ Object
Returns the value of attribute kind
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def kind @kind end |
#mass ⇒ Object
Returns the value of attribute mass
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def mass @mass end |
#node_type ⇒ Object
Returns the value of attribute node_type
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def node_type @node_type end |
#occurrences ⇒ Object
Returns the value of attribute occurrences
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def occurrences @occurrences end |
#reasons ⇒ Object
Returns the value of attribute reasons
25 26 27 |
# File 'lib/moult/duplication_report.rb', line 25 def reasons @reasons end |
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/moult/duplication_report.rb', line 26 def to_h { category: Duplication::Confidence::CATEGORY, confidence: confidence, kind: kind.to_s, node_type: node_type, mass: mass, reasons: reasons.map(&:to_h), occurrences: occurrences.map(&:to_h) } end |