Class Ruport::Formatter::CSV
In: lib/ruport/formatter/csv.rb
Parent: Formatter

This formatter implements the CSV format for Ruport‘s Row, Table, Group and Grouping renderers. It is a light wrapper around James Edward Gray II‘s FasterCSV.

Rendering Options

:style Used for grouping (:inline,:justified,:raw)

:format_options A hash of FasterCSV options

:show_table_headers True by default

:show_group_headers True by default

Methods

Public Instance methods

Hook for setting available options using a template. See the template documentation for the available options and their format.

Renders the group body - uses the table renderer to generate the output.

Renders the header for a group using the group name.

Determines the proper style to use and renders the Grouping.

Generates a header for the grouping using the grouped_by column and the column names.

Produces CSV output for a data row.

Calls the row renderer for each row in the Data::Table

Generates table header by turning column_names into a CSV row. Uses the row renderer to generate the actual formatted output

This method does not do anything if options.show_table_headers is false or the Data::Table has no column names.

[Validate]