Sha256: c8a5beecc5087b47da59d227ad4283eb6cb73ca337e2f9b7d81a2e79b9cf5b8f
Contents?: true
Size: 1006 Bytes
Versions: 1
Compression:
Stored size: 1006 Bytes
Contents
class MetaReports::Report < MetaReports::Base # # Shared colors. The key is the class name, value is RGB in hex format # # Example: "highlight: 'ffcccc'" is 'tr.highlight {background: #ffcccc}' in CSS, and "$highlight: #ffcccc;"" as a SASS variable. # COLORS = { even: 'efefef', odd: 'ffffff', yellow: ['ffffaa', 'ffffcc', 'f9f9a4', 'f9f9c6'], highlight: '$yellow_1 !important', } # # Reports # 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
meta_reports-0.0.5 | lib/generators/meta_reports/templates/models/report.rb |