Class: SirTracksAlot::Reports::BasicReport
- Defined in:
- lib/sir_tracks_alot/reports/basic_report.rb
Defined Under Namespace
Modules: Helpers Classes: HTML
Constant Summary collapse
- COLUMN_NAMES =
['group', 'title', 'count']
Instance Attribute Summary
Attributes inherited from Report
Instance Method Summary collapse
Methods inherited from Report
Instance Method Details
#setup ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/sir_tracks_alot/reports/basic_report.rb', line 7 def setup .column_names ||= COLUMN_NAMES table = Table(.column_names, :data => .data) grouping = Grouping(table, :by => "group", :order => 'group') grouping.each{|n, g| g.sort_rows_by!('count', :order => :descending)} self.data = grouping end |