Class | TrackRecordReport::ReportRow |
In: |
lib/track_record_report.rb
|
Parent: | ReportElementaryCalculator |
Store information about a specific task over a full report date range. The parent report contains information about that range.
cells | [R] | Array of ReportCell objects |
task | [R] | Task for which this row exists |
user_row_totals | [R] | Array of ReportUserRowTotal objects |
# File lib/track_record_report.rb, line 944 944: def initialize( task ) 945: super() 946: @cells = [] 947: @user_row_totals = [] 948: @task = task 949: end
Add the given ReportCell object to the "@cells" array and increment the internal running total for the row.
# File lib/track_record_report.rb, line 954 954: def add_cell( cell ) 955: @cells.push( cell ) 956: add!( cell ) 957: end
Call to add ReportUserRowTotal objects to the row‘s @user_row_totals array.
# File lib/track_record_report.rb, line 969 969: def add_user_row_total( user_row_total ) 970: @user_row_totals.push( user_row_total ) 971: end
Delete a ReportCell object from the "@cells" array at the given index.
# File lib/track_record_report.rb, line 961 961: def delete_cell( index ) 962: subtract!( @cells[ index ] ) 963: @cells.delete_at( index ) 964: end