Class: ActiveReporter::Serializer::Table
- Inherits:
-
Base
- Object
- Base
- ActiveReporter::Serializer::Table
show all
- Defined in:
- lib/active_reporter/serializer/table.rb
Instance Attribute Summary
Attributes inherited from Base
#report
Instance Method Summary
collapse
Methods inherited from Base
#axis_summary, #filter_summary, #human_aggregator_label, #human_aggregator_value_label, #human_category_value_label, #human_dimension_label, #human_dimension_value_label, #human_null_value_label, #human_number_value_label, #human_time_value_label, #initialize, #record_type, #time_formats
Instance Method Details
#caption ⇒ Object
16
17
18
|
# File 'lib/active_reporter/serializer/table.rb', line 16
def caption
axis_summary
end
|
#each_row ⇒ Object
8
9
10
11
12
13
14
|
# File 'lib/active_reporter/serializer/table.rb', line 8
def each_row
return to_enum(__method__) unless block_given?
report.flat_data.each do |xes, y|
yield report.groupers.zip(xes).map { |d, v| human_dimension_value_label(d, v) } + [human_aggregator_value_label(report.all_aggregators, y)]
end
end
|
4
5
6
|
# File 'lib/active_reporter/serializer/table.rb', line 4
def
report.groupers.map(&method(:human_dimension_label)) + [human_aggregator_label(report.all_aggregators)]
end
|