Class: TableFlip

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

Defined Under Namespace

Classes: DBNotEmptyError

Constant Summary collapse

OVERRIDE_FLAG =
"WIPE_DB_YES_I_REALLY_REALLY_KNOW_WHAT_IM_DOING"

Instance Method Summary collapse

Constructor Details

#initialize(db) ⇒ TableFlip

Returns a new instance of TableFlip.



9
10
11
# File 'lib/table_flip.rb', line 9

def initialize(db)
  @db = db
end

Instance Method Details

#check!Object



13
14
15
16
# File 'lib/table_flip.rb', line 13

def check!
  return if ENV[OVERRIDE_FLAG] == "true"
  ❨╯°□°❩╯︵┻━┻ if non_empty_tables.any?
end