class MCollective::Aggregate::Sum - mcollective version 2.12.5

# class MCollective::Aggregate::Sum

### Public Instance Methods

process_result(value, reply) click to toggle source

Determines the average of a set of numerical values

       # File lib/mcollective/aggregate/sum.rb
    13 def process_result(value, reply)
    14   @result[:value] += value
    15 end

startup_hook() click to toggle source

       # File lib/mcollective/aggregate/sum.rb
     4 def startup_hook
     5   @result[:value] = 0
     6   @result[:type] = :numeric
     7
     8   # Set default aggregate_function if it is undefined
     9   @aggregate_format = "Sum of #{@result[:output]}: %f" unless @aggregate_format
    10 end