Module: Preservation::Report::Database

Defined in:
lib/preservation/report/database.rb

Overview

Database

Class Method Summary collapse

Class Method Details

.db_connection(db_path) ⇒ SQLite3::Database

Database connection

Returns:

  • (SQLite3::Database)


14
15
16
17
18
19
# File 'lib/preservation/report/database.rb', line 14

def self.db_connection(db_path)
  if db_path.nil?
    raise 'Missing db_path'
  end
  @db ||= SQLite3::Database.new db_path
end