class Adbc::Cleaner

Constants

EXCLUDES_TABLES

Public Class Methods

new(connection) click to toggle source
# File lib/adbc/cleaner.rb, line 5
def initialize(connection)
  @connection = connection
end

Public Instance Methods

clean() click to toggle source
# File lib/adbc/cleaner.rb, line 9
def clean
  raise "Use in test environment please" unless Rails.env.test?
  (@connection.tables - EXCLUDES_TABLES).each do |table_name|
    @connection.truncate(table_name)
  end
end