class Bucky::Core::Database::DbConnector

Attributes

con[R]

Public Class Methods

new() click to toggle source
# File lib/bucky/core/database/db_connector.rb, line 12
def initialize
  @test_db_config = Bucky::Utils::Config.instance[:test_db]
end

Public Instance Methods

connect(db_name = 'bucky_test') click to toggle source

Connect to database @param [String] db_name database name

# File lib/bucky/core/database/db_connector.rb, line 18
def connect(db_name = 'bucky_test')
  @con = Sequel.connect(@test_db_config[db_name.to_sym], encoding: 'utf8')
end
disconnect() click to toggle source

Disconnect to database

# File lib/bucky/core/database/db_connector.rb, line 23
def disconnect
  @con.disconnect
end