Module: TADB::DB

Defined in:
lib/tadb/db.rb

Class Method Summary collapse

Class Method Details

.clear_allObject



9
10
11
12
13
14
15
16
# File 'lib/tadb/db.rb', line 9

def self.clear_all
  #FileUtils.remove_dir('./db', true)
  Utils.db_files.each do |filename|
    FileUtils.chdir('./db') do
      File.delete(filename)
    end
  end
end

.table(table_name, clear_if_content = false) ⇒ Object



5
6
7
# File 'lib/tadb/db.rb', line 5

def self.table(table_name, clear_if_content = false)
  Table.new(table_name, clear_if_content)
end