Method: Wgit::DSL#use_database

Defined in:
lib/wgit/dsl.rb

#use_database(db) ⇒ Object

Defines the connected database instance used in subsequent index and DB method calls. This method is optional however, as a new instance of the Wgit::Database.adapter_class will be initialised otherwise. Therefore if not calling this method, you should ensure ENV['WGIT_CONNECTION_STRING'] is set or the connection will fail.

Parameters:



170
171
172
# File 'lib/wgit/dsl.rb', line 170

def use_database(db)
  @dsl_db = db
end