Module: Arql::Commands::Models

Defined in:
lib/arql/commands/models.rb

Class Method Summary collapse

Class Method Details

.modelsObject



6
7
8
9
10
11
12
13
14
# File 'lib/arql/commands/models.rb', line 6

def models
  t = []
  t << ['Table Name', 'Model Class', 'Abbr']
  t << nil
  Arql::Definition.models.each do |definition|
    t << [definition[:table], definition[:model].name, definition[:abbr] || '']
  end
  t
end

.models_tableObject



16
17
18
19
20
# File 'lib/arql/commands/models.rb', line 16

def models_table
  Terminal::Table.new do |t|
    models.each { |row| t << (row || :separator) }
  end
end