diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-03-06 17:29:50 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-03-06 17:29:50 -0500 |
commit | b1395163fa45ed788af4d2d003c1dd49846d86ee (patch) | |
tree | 39ba885f3a7d51836f13c59e1f6f6d01dc756071 /src/guff/model.cr | |
parent | 5a57a15f5e154b2e2dc312b1e92600449c6ca1f9 (diff) | |
download | old-guff-b1395163fa45ed788af4d2d003c1dd49846d86ee.tar.bz2 old-guff-b1395163fa45ed788af4d2d003c1dd49846d86ee.zip |
add model mapper and stub post and tag models
Diffstat (limited to 'src/guff/model.cr')
-rw-r--r-- | src/guff/model.cr | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/guff/model.cr b/src/guff/model.cr index 1df437b..ef1b457 100644 --- a/src/guff/model.cr +++ b/src/guff/model.cr @@ -3,22 +3,13 @@ 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) + def initialize(@models : Models) end + end - private def update_db(path) - DatabaseUpdater.run(path, @config) - end + class PostModel < Model + end + + class TagModel < Model end end |