Class: Assistant::TechnicalSupport::CaseReplayAnalyzer::Result

Inherits:
Data
  • Object
show all
Defined in:
app/services/assistant/technical_support/case_replay_analyzer.rb

Overview

Immutable structured-analysis outcome.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status: nil, data: {}, reason: nil) ⇒ Result

Builds a structured analysis result.

Parameters:

  • status (Symbol, nil) (defaults to: nil)

    success or ineligible

  • data (Hash) (defaults to: {})

    parsed schema-constrained model output

  • reason (String, nil) (defaults to: nil)

    explanation for an ineligible episode



19
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 19

def initialize(status: nil, data: {}, reason: nil) = super

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



13
14
15
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 13

def data
  @data
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



13
14
15
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 13

def reason
  @reason
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



13
14
15
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 13

def status
  @status
end

Instance Method Details

#ineligible?Boolean

Reports whether case evidence was unsuitable for replay.

Returns:

  • (Boolean)

    whether the result is an expected ineligible outcome



29
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 29

def ineligible? = status == :ineligible

#success?Boolean

Reports whether structured analysis completed successfully.

Returns:

  • (Boolean)

    whether the result contains usable output



24
# File 'app/services/assistant/technical_support/case_replay_analyzer.rb', line 24

def success? = status == :success