Module | Sequel::PrettyTable
In: | lib/sequel/extensions/pretty_table.rb

### Methods

print

### Public Class methods

print(records, columns = nil)

Prints nice-looking plain-text tables via puts

      +--+-------+
      |id|name   |
      |--+-------|
      |1 |fasdfas|
      |2 |test   |
      +--+-------+

[Source]

        # File lib/sequel/extensions/pretty_table.rb, line 22
    22:     def self.print(records, columns = nil) # records is an array of hashes
    23:       columns ||= records.first.keys.sort_by{|x|x.to_s}
    24:       sizes = column_sizes(records, columns)
    25:       sep_line = separator_line(columns, sizes)
    26:
    27:       puts sep_line
    28:       puts header_line(columns, sizes)
    29:       puts sep_line
    30:       records.each {|r| puts data_line(columns, sizes, r)}
    31:       puts sep_line
    32:     end

[Validate]