Module: Sequel::DatasetPrinter

Defined in:
lib/sequel/extensions/pretty_table.rb

Instance Method Summary collapse

Instance Method Details

Pretty prints the records in the dataset as plain-text table.



28
29
30
31
32
# File 'lib/sequel/extensions/pretty_table.rb', line 28

def print(*cols)
  ds = naked
  rows = ds.all
  Sequel::PrettyTable.print(rows, cols.empty? ? ds.columns : cols)
end