module PgBackup::Helpers::Database

Public Instance Methods

connection_config() click to toggle source
# File lib/pg_backup/helpers/database.rb, line 13
def connection_config
  ActiveRecord::Base.connection_config
end
with_database_config() { |fetch(:host, 'localhost'), fetch(:database), fetch(:username), fetch(:password)| ... } click to toggle source
# File lib/pg_backup/helpers/database.rb, line 4
def with_database_config
  yield(
    connection_config.fetch(:host, 'localhost'),
    connection_config.fetch(:database),
    connection_config.fetch(:username),
    connection_config.fetch(:password)
  )
end