class TrackRecordReport::ReportUserColumnTotal

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.

Public Instance Methods

calculate!( rows, user_index ) click to toggle source

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 1257
def calculate!( rows, user_index )
  reset!()

  rows.each do | row |
    add!( row.user_row_totals[ user_index ] )
  end
end