Class: Combustion::Database

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

Defined Under Namespace

Classes: LoadSchema, Migrate, Reset

Constant Summary collapse

DEFAULT_OPTIONS =
{
  :database_reset   => true,
  :load_schema      => true,
  :database_migrate => true
}.freeze

Class Method Summary collapse

Class Method Details

.setup(options = {}) ⇒ Object


14
15
16
17
18
19
20
# File 'lib/combustion/database.rb', line 14

def self.setup(options = {})
  options = DEFAULT_OPTIONS.merge options

  Combustion::Database::Reset.call      if options[:database_reset]
  Combustion::Database::LoadSchema.call if options[:load_schema]
  Combustion::Database::Migrate.call    if options[:database_migrate]
end