Class: Rapport::ReportGeneratorSimpleCsv
- Inherits:
-
Object
- Object
- Rapport::ReportGeneratorSimpleCsv
show all
- Includes:
- ReportGenerator
- Defined in:
- lib/rapport/report_generators/report_generator_simple_csv.rb
Instance Attribute Summary
#report
Instance Method Summary
collapse
#cell_formatter, #format, from, included, #output_filename
Instance Method Details
#report_name ⇒ Object
41
42
43
|
# File 'lib/rapport/report_generators/report_generator_simple_csv.rb', line 41
def report_name
report.table_name.sub('reports_','')
end
|
#zip_output_file! ⇒ Object
33
34
35
36
37
38
39
|
# File 'lib/rapport/report_generators/report_generator_simple_csv.rb', line 33
def zip_output_file!
zip_file_name = output_filename.sub(/(\.[^\.]*)?$/,'.zip')
Zip::ZipFile.open(zip_file_name, Zip::ZipFile::CREATE) do |zipfile|
zipfile.add(File.basename(output_filename),output_filename)
end
@output_filename = zip_file_name
end
|