"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/ruport/formatter/csv.rb" between
ruport-1.7.1.tar.gz and ruport-1.8.0.tar.gz

About: Ruport (Ruby Reports) is a simple, extensible reporting system built for Rubyists. It provides tools for data acquisition, database interaction, formatting, and parsing/munging.

csv.rb  (ruport-1.7.1):csv.rb  (ruport-1.8.0)
skipping to change at line 58 skipping to change at line 58
options.format_options ||= template.format_options options.format_options ||= template.format_options
end end
# Returns the current CSV object or creates a new one if it has not # Returns the current CSV object or creates a new one if it has not
# been set yet. Note that FCSV(sig) has a cache and returns the *same* # been set yet. Note that FCSV(sig) has a cache and returns the *same*
# FCSV object if writing to the same underlying output with the same # FCSV object if writing to the same underlying output with the same
# options. # options.
# #
def csv_writer def csv_writer
@csv_writer ||= options.formatter || @csv_writer ||= options.formatter ||
::CSV.instance(output, options.format_options || {}) ::CSV.instance(output, **(options.format_options || {}))
end end
# Generates table header by turning column_names into a CSV row. # Generates table header by turning column_names into a CSV row.
# Uses the row controller to generate the actual formatted output # Uses the row controller to generate the actual formatted output
# #
# This method does not do anything if options.show_table_headers is false # This method does not do anything if options.show_table_headers is false
# or the Data::Table has no column names. # or the Data::Table has no column names.
def build_table_header def build_table_header
unless data.column_names.empty? || !options.show_table_headers unless data.column_names.empty? || !options.show_table_headers
render_row data.column_names, :format_options => options.format_options, render_row data.column_names, :format_options => options.format_options,
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)