aboutsummaryrefslogtreecommitdiff
path: root/lib/chotto.rb
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-12 23:56:29 +0100
committermms <git@sapka.me>2024-11-12 23:56:29 +0100
commit7a39066fa6020a2349c640588d295d74f473945e (patch)
treee5c201c4d5d5d7df1eb181eda013304e3952385e /lib/chotto.rb
parent7b0046756dccabac0346e637515d4939a3de3da6 (diff)
feat: save DB after rules eval0.0.1
Diffstat (limited to 'lib/chotto.rb')
-rw-r--r--lib/chotto.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chotto.rb b/lib/chotto.rb
index 6afcf35..6e1f908 100644
--- a/lib/chotto.rb
+++ b/lib/chotto.rb
@@ -28,6 +28,10 @@ module Chotto
def rule_set(name, &block)
@rule_sets << RuleSet.new(name, block)
end
+
+ def close_db
+ db.close
+ end
end
end
@@ -35,4 +39,5 @@ def eval_rules
Chotto.rule_sets.each do |rule_set|
rule_set.run
end
+ Chotto.close_db
end