module Bosh::Director::DbBackup
Public Class Methods
adapter_to_module(adapter)
click to toggle source
# File lib/bosh/director/db_backup.rb, line 11 def self.adapter_to_module(adapter) adapter_module = adapter.capitalize if Adapter.const_defined?(adapter_module) Adapter.const_get adapter_module else raise Adapter::Error.new("backup for database adapter #{adapter} (module #{adapter_module}) is not implemented") end end
create(db_config)
click to toggle source
# File lib/bosh/director/db_backup.rb, line 7 def self.create(db_config) adapter_to_module(db_config['adapter']).new(db_config) end