Class | TrackRecordReport::ReportUserColumnTotal |
In: |
lib/track_record_report.rb
|
Parent: | ReportElementaryCalculator |
Analogous to ReportUserRowTotal, but sums across all rows. The objects should be added to the Report object @user_column_totals array in the order of appearance in the Report‘s @users array.
Pass an array of ReportRow objects to sum over and the index in the row user summary arrays of the user in which you have an interest.
# File lib/track_record_report.rb, line 1208 1208: def calculate!( rows, user_index ) 1209: reset!() 1210: 1211: rows.each do | row | 1212: add!( row.user_row_totals[ user_index ] ) 1213: end 1214: end