Class: SqlReporter::Reporters::PdfTableReporter
- Inherits:
-
LogReporter
- Object
- Reporter
- LogReporter
- SqlReporter::Reporters::PdfTableReporter
- Defined in:
- lib/sql_reporter/reporters/pdf_table_reporter.rb
Constant Summary
Constants inherited from LogReporter
LogReporter::EXTENSION, LogReporter::HEADERS
Constants inherited from Reporter
Instance Attribute Summary collapse
-
#totals ⇒ Object
readonly
Returns the value of attribute totals.
Attributes inherited from LogReporter
Attributes inherited from Reporter
#disable_console, #feature, #fname0, #fname1, #io, #master, #master_max_count, #output
Instance Method Summary collapse
Methods inherited from Reporter
#generate_report, #initialize, #output_file
Constructor Details
This class inherits a constructor from SqlReporter::Reporters::Reporter
Instance Attribute Details
#totals ⇒ Object (readonly)
Returns the value of attribute totals.
8 9 10 |
# File 'lib/sql_reporter/reporters/pdf_table_reporter.rb', line 8 def totals @totals end |
Instance Method Details
#produce_table(pdf_context) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/sql_reporter/reporters/pdf_table_reporter.rb', line 10 def produce_table(pdf_context) t = pdf_context.make_table([HEADERS, *lines]) t.draw pdf_context.move_down(20) pdf_context.font_size(12) { pdf_context.text(totals.summary, styles: [:bold]) } end |