Class: Moult::Flags::Staleness::Assessment

Inherits:
Struct
  • Object
show all
Defined in:
lib/moult/flags/staleness.rb

Overview

The graded result: the staleness status, its confidence in [0, 1], and the reasons behind them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confidenceObject

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



69
70
71
# File 'lib/moult/flags/staleness.rb', line 69

def confidence
  @confidence
end

#reasonsObject

Returns the value of attribute reasons

Returns:

  • (Object)

    the current value of reasons



69
70
71
# File 'lib/moult/flags/staleness.rb', line 69

def reasons
  @reasons
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



69
70
71
# File 'lib/moult/flags/staleness.rb', line 69

def status
  @status
end

Instance Method Details

#to_hObject



70
71
72
# File 'lib/moult/flags/staleness.rb', line 70

def to_h
  {status: status, confidence: confidence, reasons: reasons.map(&:to_h)}
end