Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/aly/app.rb

Instance Method Summary collapse

Instance Method Details

#tableObject



7
8
9
10
11
12
13
14
15
# File 'lib/aly/app.rb', line 7

def table
  return if size.zero?
  header = first.keys
  Terminal::Table.new { |t|
    t << header
    t << :separator
    each { |row| t << (row.nil? ? :separator : row.values) }
  }
end