Module: Database

Defined in:
lib/capistrano-db-pull/database.rb

Defined Under Namespace

Classes: Base, MySQL, PostgreSQL, Sqlite3

Class Method Summary collapse

Class Method Details

.factory(application) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/capistrano-db-pull/database.rb', line 2

def self.factory application
  if application.postgresql?
    Database::PostgreSQL.new
  elsif application.sqlite3?
    Database::SQLite3.new
  elsif application.mysql?
    Database::MySQL.new
  else
    raise 'Not implemented'
  end
end