Removed unneeded db class

master
E. Almqvist 3 years ago
parent 015820efad
commit 1e3eeafc01
  1. 18
      src/database.rb
  2. 0
      src/db/main.db

@ -1,15 +1,7 @@
DEFAULT_DB_PATH = "db/database.db"
DEFAULT_DB_PATH = "db/main.db"
class Database
attr_reader :name, :db_path
def initialize(name, db_path=DEFAULT_DB_PATH)
@name = name
@db_path = db_path
end
def get_handle
db = SQLite3::Database.new @db_path
db.results_as_hash = true
return db
end
def db_handle
db = SQLite3::Database.new DEFAULT_DB_PATH
db.results_as_hash = true
return db
end

Loading…
Cancel
Save