Class: DBA::Tables

Inherits:
Command show all
Defined in:
lib/dba/tables.rb

Instance Attribute Summary

Attributes inherited from Command

#database, #table_name

Instance Method Summary collapse

Methods inherited from Command

arity_check, #initialize

Constructor Details

This class inherits a constructor from DBA::Command

Instance Method Details

#callObject



2
3
4
5
6
7
8
# File 'lib/dba/tables.rb', line 2

def call
  database.tables.sort.each do |name|
    row_count = database[name].count

    printer.print_table(name, row_count)
  end
end