Module: Flux::Util

Included in:
CLI::PT, CLI::Review
Defined in:
lib/flux/util/table.rb,
lib/flux/util/output.rb

Defined Under Namespace

Modules: Output Classes: Table

Instance Method Summary collapse

Instance Method Details

#puts_table(raw_data, field_sep = ' ', max_width = nil) ⇒ Object

Initialize a new Table.

Parameters:

  • raw_data (Array<Array>)

    the table’s annotated data

  • field_sep (defaults to: ' ')

    the string used to separate columns

  • max_width (Integer) (defaults to: nil)

    the maximum width for this table. Lines exceeding this width will be truncated.

  • shell

    the shell object used by the current task



10
11
12
# File 'lib/flux/util/table.rb', line 10

def puts_table(raw_data, field_sep = '  ', max_width = nil)
  $stdout.puts Table.new(shell, raw_data, field_sep, max_width)
end