Sha256: 62f5c0587660f42f677a6c64b3301589cbb8ad4b5bb981dde06951789273c9fa
Contents?: true
Size: 427 Bytes
Versions: 4
Compression:
Stored size: 427 Bytes
Contents
require 'tty/table' module Chronicle module ETL class TableLoader < Chronicle::ETL::Loader def initialize(options) super(options) end def load(result) @table ||= TTY::Table.new(header: result.keys) values = result.values.map{|x| x.to_s[0..30]} @table << values end def finish puts @table.render(:ascii, padding: [0, 1]) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems