require "./database" require "./database-updater" module Guff class Model getter :config getter :db def initialize(@config : Config) # create site database db_path = "%s/site.db" % [config["data"]] # update database (if necessary) update_db(db_path) # open db @db = Database.new(db_path) end private def update_db(path) DatabaseUpdater.run(path, @config) end end end