Class: SirTracksAlot::Reports::Report

Inherits:
Ruport::Controller
  • Object
show all
Defined in:
lib/sir_tracks_alot/reports/report.rb

Direct Known Subclasses

BasicReport, SimpleReport, SirTracksAlotReport

Defined Under Namespace

Modules: Helpers

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#allObject

Returns the value of attribute all


4
5
6
# File 'lib/sir_tracks_alot/reports/report.rb', line 4

def all
  @all
end

Class Method Details

.build_rows(filters) ⇒ Object

Accepts either: options: => {:owner => 'xxx'} options: [=> 'xxx']


9
10
11
12
13
14
15
16
17
18
# File 'lib/sir_tracks_alot/reports/report.rb', line 9

def self.build_rows(filters)
  rows = []          
  filters = {nil => filters} if filters.kind_of?(Array)

  filters.each do |title, options_for_find|
    rows += SirTracksAlot::Count.rows(options_for_find, title)
  end

  rows
end

Instance Method Details

#setupObject


20
21
22
23
24
# File 'lib/sir_tracks_alot/reports/report.rb', line 20

def setup
  self.data = []        
  options.report_class ||= ''
  options.report_title ||= 'Report'
end