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.

Methods

Attributes

cells  [R]  Array of ReportCell objects
task  [R]  Task for which this row exists
user_row_totals  [R]  Array of ReportUserRowTotal objects

Public Class methods

[Source]

     # 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

Public Instance methods

Add the given ReportCell object to the "@cells" array and increment the internal running total for the row.

[Source]

     # 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.

[Source]

     # 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.

[Source]

     # File lib/track_record_report.rb, line 961
961:     def delete_cell( index )
962:       subtract!( @cells[ index ] )
963:       @cells.delete_at( index )
964:     end

Call to delete a row total from a specific index.

[Source]

     # File lib/track_record_report.rb, line 975
975:     def delete_user_row_total( index )
976:       @user_row_totals.delete_at( index )
977:     end

[Validate]