Class: Assistant::TechnicalSupport::CaseReplayBatch::Result

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attemptsObject (readonly)

Returns the value of attribute attempts

Returns:

  • (Object)

    the current value of attempts



73
74
75
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 73

def attempts
  @attempts
end

#selectionObject (readonly)

Returns the value of attribute selection

Returns:

  • (Object)

    the current value of selection



73
74
75
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 73

def selection
  @selection
end

Instance Method Details

#complete_event_stream_countObject



77
78
79
80
81
82
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 77

def complete_event_stream_count
  attempts.count do |attempt|
    result = attempt.result
    result.evidence_event_count.positive? && result.evidence_blockers.empty?
  end
end

#evaluated_countObject



74
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 74

def evaluated_count = attempts.count(&:evaluated?)

#incomplete_event_stream_countObject



84
85
86
87
88
89
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 84

def incomplete_event_stream_count
  attempts.count do |attempt|
    result = attempt.result
    result.evidence_event_count.positive? && result.evidence_blockers.any?
  end
end

#passed_countObject



75
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 75

def passed_count = attempts.count { |attempt| attempt.result.passed? }

#unavailable_event_stream_countObject



91
92
93
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 91

def unavailable_event_stream_count
  attempts.count { |attempt| attempt.result.evidence_event_count.zero? }
end