Class | Ruport::Formatter::HTML |
In: |
lib/ruport/formatter/html.rb
|
Parent: | Formatter |
This class produces HTML output for Ruport‘s Row, Table, Group, and Grouping renderers. It can be subclassed, as it has some helper methods that might be useful for custom output.
:show_table_headers True by default
:show_group_headers True by default
:style Used for grouping (:inline, :justified)
Hook for setting available options using a template. See the template documentation for the available options and their format.
Generates the body for a grouping. Iterates through the groups and renders them using the group renderer.
Generates table headers based on the column names of your Data::Table.
This method does not do anything if options.show_table_headers is false or the Data::Table has no column names.
Generates <table> tags enclosing the yielded content.
Example:
output << html_table { "<tr><td>1</td><td>2</td></tr>\n" } #=> "<table>\n<tr><td>1</td><td>2</td></tr>\n</table>\n"