Class: DevSuite::Utils::Table::Renderer::Simple

Inherits:
Base show all
Defined in:
lib/dev_suite/utils/table/renderer/simple.rb

Instance Method Summary collapse

Methods inherited from Construct::Component::Base

component_key

Instance Method Details

#render(table) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/dev_suite/utils/table/renderer/simple.rb', line 8

def render(table)
  column_widths = calculate_column_widths(table)

  [
    render_title(table, column_widths),
    render_separator(column_widths),
    render_header(table, column_widths),
    render_separator(column_widths),
    render_rows(table, column_widths),
  ].compact.join("\n")
end