class ApacheCrunch::Sum
DSL routine that calculates the sum of the quantities given by the block
All values produced by the block must have a to_f method, and this routine returns a float.
Public Instance Methods
execute(&blk)
click to toggle source
# File lib/procedure_dsl.rb, line 60 def execute(&blk) rslt = 0.0 while @_current_entry = @_log_parser.next_entry rslt += instance_eval(&blk).to_f end rslt end