class TrackRecordReport::Section

A Section object keeps track of per-column totals within a set of Rows, along with an overall section total.

There may be many Rows that refer back to a given Section, the caller being responsible for maintaining the mapping and count as they best see fit.

Section objects can maintain per-user contribution counts just as in Rows, but callers may choose not to use that feature.

In terms of API, a report’s Section inherits from Row and incorporates a TrackRecordSection module’s Section behaviour too. This is basically a direct subtitute, in this class’s case, for multiple inheritance. We want a report to expose a section/group interface and to support calculation within section details at the same time.

Public Class Methods

new( identifier, project ) click to toggle source
# File lib/track_record_report.rb, line 207
def initialize( identifier, project )
  super()
  initialize_section( identifier, project ) # TrackRecordSections::SectionMixin
end