Class: ReportsKit::Reports::Data::AddTableAggregations

Inherits:
Object
  • Object
show all
Defined in:
lib/reports_kit/reports/data/add_table_aggregations.rb

Constant Summary collapse

VALID_AGGREGATION_OPERATORS =
[:sum]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data, report_options:) ⇒ AddTableAggregations

Returns a new instance of AddTableAggregations.



9
10
11
12
# File 'lib/reports_kit/reports/data/add_table_aggregations.rb', line 9

def initialize(data, report_options:)
  self.data = data
  self.report_options = report_options || {}
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



5
6
7
# File 'lib/reports_kit/reports/data/add_table_aggregations.rb', line 5

def data
  @data
end

#report_optionsObject

Returns the value of attribute report_options.



5
6
7
# File 'lib/reports_kit/reports/data/add_table_aggregations.rb', line 5

def report_options
  @report_options
end

Instance Method Details

#performObject



14
15
16
# File 'lib/reports_kit/reports/data/add_table_aggregations.rb', line 14

def perform
  data_with_aggregations
end