Class: Assistant::TechnicalSupport::CaseReplayBatch::Result
- Inherits:
-
Data
- Object
- Data
- Assistant::TechnicalSupport::CaseReplayBatch::Result
- Defined in:
- app/services/assistant/technical_support/case_replay_batch.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
readonly
Returns the value of attribute attempts.
-
#selection ⇒ Object
readonly
Returns the value of attribute selection.
Instance Method Summary collapse
- #complete_event_stream_count ⇒ Object
- #evaluated_count ⇒ Object
- #incomplete_event_stream_count ⇒ Object
- #passed_count ⇒ Object
- #unavailable_event_stream_count ⇒ Object
Instance Attribute Details
#attempts ⇒ Object (readonly)
Returns the value of attribute attempts
73 74 75 |
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 73 def attempts @attempts end |
#selection ⇒ Object (readonly)
Returns the value of attribute 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_count ⇒ Object
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_count ⇒ Object
74 |
# File 'app/services/assistant/technical_support/case_replay_batch.rb', line 74 def evaluated_count = attempts.count(&:evaluated?) |
#incomplete_event_stream_count ⇒ Object
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_count ⇒ Object
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_count ⇒ Object
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 |