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.



32
33
34
35
36
# File 'lib/sequel/extensions/pretty_table.rb', line 32

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