Module: CoreExtensions::Array::TablePresenter

Defined in:
lib/extensions/class-extensions.rb

Instance Method Summary collapse

Instance Method Details

#as_table(&b) ⇒ Object



10
11
12
13
14
# File 'lib/extensions/class-extensions.rb', line 10

def as_table(&b)
  the_table_header = first.table_header(&b)
  the_table_rows = map &:table_row
  Terminal::Table.new headings: the_table_header, rows: the_table_rows , style: { border: :unicode }
end