4 # Before function is run processing
7 @result[:type] = :numeric
11 # Set default aggregate_function if it is undefined
12 @aggregate_format = "Average of #{@result[:output]}: %f" unless @aggregate_format
15 # Determines the average of a set of numerical values
16 def process_result(value, reply)
17 @result[:value] += value
21 # Stops execution of the function and returns a ResultObject
23 @result[:value] /= @count
25 result_class(:numeric).new(@result, @aggregate_format, @action)