Class: Moult::Health::Score::Reason
- Inherits:
-
Struct
- Object
- Struct
- Moult::Health::Score::Reason
- Defined in:
- lib/moult/health/score.rb
Overview
One auditable observation behind a sub-score. Mirrors the rule/.../detail
reason shape used across Moult, but health sub-scores are RATIOS not signed
delta-sums, so it carries the observed value (a [0, 1] quantity) rather
than a delta. Kept local so the health slice does not couple to the
dead-code or duplication Reason structs.
Instance Attribute Summary collapse
-
#detail ⇒ Object
Returns the value of attribute detail.
-
#rule ⇒ Object
Returns the value of attribute rule.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#detail ⇒ Object
Returns the value of attribute detail
83 84 85 |
# File 'lib/moult/health/score.rb', line 83 def detail @detail end |
#rule ⇒ Object
Returns the value of attribute rule
83 84 85 |
# File 'lib/moult/health/score.rb', line 83 def rule @rule end |
#value ⇒ Object
Returns the value of attribute value
83 84 85 |
# File 'lib/moult/health/score.rb', line 83 def value @value end |
Instance Method Details
#to_h ⇒ Object
84 85 86 |
# File 'lib/moult/health/score.rb', line 84 def to_h {rule: rule.to_s, value: value, detail: detail} end |