Sha256: c93d46d3042306bad60cd1437e43770bc6ec4f89ba120a3224b46db73e08bad7
Contents?: true
Size: 303 Bytes
Versions: 4
Compression:
Stored size: 303 Bytes
Contents
require 'xlsxwriter' module WithXlsxFile def with_xlsx_file(file_path = 'tmp/test.xlsx', **opts) after = opts.delete :after XlsxWriter::Workbook.open(file_path, opts) do |wb| yield wb end after.call if after ensure File.delete file_path if File.exist? file_path end end
Version data entries
4 entries across 4 versions & 1 rubygems