Sha256: bb49b19bc58d1d2a5f8c9a7e2f79ef04b5f5812304c2020b8a9383a76040b218
Contents?: true
Size: 547 Bytes
Versions: 4
Compression:
Stored size: 547 Bytes
Contents
require 'csv' require 'json' module Tabula module Writers def Writers.CSV(lines, output=$stdout) lines.each { |l| output.write CSV.generate_line(l.map(&:text), row_sep: "\r\n") } end def Writers.JSON(lines, output=$stdout) output.write lines.to_json end def Writers.TSV(lines, output=$stdout) tsv_string = lines.each { |l| output.write(l.map(&:text).join("\t") + "\n") } end def Writers.HTML(lines, output=$stdout) raise "not implemented" end end end
Version data entries
4 entries across 4 versions & 1 rubygems