Method: QaServer::PerformanceCalculatorService#initialize

Defined in:
app/services/qa_server/performance_calculator_service.rb

#initialize(records, action: nil) ⇒ PerformanceCalculatorService

Returns a new instance of PerformanceCalculatorService.

Parameters:

  • records (Array <Qa::PerformanceHistory>)

    set of records used to calculate the statistics



11
12
13
14
15
# File 'app/services/qa_server/performance_calculator_service.rb', line 11

def initialize(records, action: nil)
  @records = records
  @action = [:search, :fetch].include?(action) ? action : nil
  @stats = {}
end