Module: Tabloid::Report::ClassMethods

Defined in:
lib/tabloid/report.rb

Instance Method Summary collapse

Instance Method Details

#cache_key(&block) ⇒ Object



34
35
36
37
38
# File 'lib/tabloid/report.rb', line 34

def cache_key(&block)
  if block
    @cache_block = block
  end
end

#cache_key_blockObject



40
41
42
# File 'lib/tabloid/report.rb', line 40

def cache_key_block
  @cache_block
end

#element(key, label = "", options = {}) ⇒ Object



52
53
54
# File 'lib/tabloid/report.rb', line 52

def element(key, label = "", options={})
  @report_columns << Tabloid::ReportColumn.new(key, label, options)
end

#grouping(key, options = {}) ⇒ Object



56
57
58
59
# File 'lib/tabloid/report.rb', line 56

def grouping(key, options = {})
  @grouping_key     = key
  @grouping_options = options
end

#grouping_keyObject



61
62
63
# File 'lib/tabloid/report.rb', line 61

def grouping_key
  @grouping_key
end

#grouping_optionsObject



65
66
67
# File 'lib/tabloid/report.rb', line 65

def grouping_options
  @grouping_options
end

#parameter(*args) ⇒ Object



14
15
16
# File 'lib/tabloid/report.rb', line 14

def parameter(*args)
  @report_parameters << Tabloid::Parameter.new(*args)
end

#parametersObject



22
23
24
# File 'lib/tabloid/report.rb', line 22

def parameters
  @report_parameters
end

#report_columnsObject



30
31
32
# File 'lib/tabloid/report.rb', line 30

def report_columns
  @report_columns
end

#rows(*args, &block) ⇒ Object



48
49
50
# File 'lib/tabloid/report.rb', line 48

def rows(*args, &block)
  @rows_block = block
end

#rows_blockObject



44
45
46
# File 'lib/tabloid/report.rb', line 44

def rows_block
  @rows_block
end

#store_parameters(attribute) ⇒ Object



18
19
20
# File 'lib/tabloid/report.rb', line 18

def store_parameters(attribute)

end

#summary(summary_options = {}) ⇒ Object



26
27
28
# File 'lib/tabloid/report.rb', line 26

def summary(summary_options = {})
  @summary_options = summary_options
end

#summary_optionsObject



69
70
71
# File 'lib/tabloid/report.rb', line 69

def summary_options
  @summary_options
end