Class: MetaReports::Report
- Defined in:
- lib/generators/meta_reports/templates/models/report.rb,
lib/generators/meta_reports/templates/models/report_non_activerecord.rb
Constant Summary collapse
- COLORS =
Shared colors. The key is the class name, value is RGB in hex format
Example: “highlight: ‘ffcccc’” is ‘tr.highlight #ffcccc’ in CSS, and “$highlight: #ffcccc;”“ as a SASS variable.
{ even: 'efefef', odd: 'ffffff', yellow: ['ffffaa', 'ffffcc', 'f9f9a4', 'f9f9c6'], highlight: '$yellow_1 !important', }
Constants inherited from Base
Class Method Summary collapse
-
.example_report(params) ⇒ Object
Reports.
Methods inherited from Base
#displays_all_formats?, #displays_any_format?, #format?, format_mask, #formats, #formats=, formats_mask, helpers, #run, test_report, #view
Class Method Details
.example_report(params) ⇒ Object
Reports
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/generators/meta_reports/templates/models/report.rb', line 21 def self.example_report(params) {title: 'Example Report', subtitle: 'this is a test report', tables: {'Table 1' => [['One','Two','Three'],[1,2,3]]}} MetaReports::Data.new do |d| d.title = 'Example Report' d.subtitle = 'Of the Testing Kind' d.description = 'This is a test report.' d.tables["Table 1"] = MetaReports::Table.new do |t| t << ['One', 'Two', 'Three'] t << [1, 2, 3] t << [4, "#{params[:disco]} Moo", 'No Way!'] end end end |