Sha256: 1e76683e10b957fecb84699cb8b1e539044e1ba04d9fc7eb046072174abab46a
Contents?: true
Size: 492 Bytes
Versions: 9
Compression:
Stored size: 492 Bytes
Contents
module IOStreams module CSV class Writer # Write to a file / stream, compressing with GZip def self.open(file_name_or_io, options = {}, &block) unless IOStreams.writer_stream?(file_name_or_io) ::CSV.open(file_name_or_io, 'wb', options, &block) else begin csv = ::CSV.new(file_name_or_io, options) block.call(csv) ensure csv.close if csv end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems