aboutsummaryrefslogtreecommitdiff
path: root/lib/chotto.rb
diff options
context:
space:
mode:
authormms <git@sapka.me>2024-11-25 00:11:05 +0100
committermms <git@sapka.me>2024-11-25 00:11:05 +0100
commitfcdfb62d0f9ca9773da57e20286b8623c2c866f5 (patch)
treee47b0d22548261f8690c3802445eb2ddab062c48 /lib/chotto.rb
parentc2623f1aa3638c988026b28f6a4131df6c61e0c6 (diff)
feat: mailig list rule
Diffstat (limited to 'lib/chotto.rb')
-rw-r--r--lib/chotto.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/chotto.rb b/lib/chotto.rb
index 61f149b..434002c 100644
--- a/lib/chotto.rb
+++ b/lib/chotto.rb
@@ -12,6 +12,7 @@ require_relative 'chotto/ruleset'
require_relative 'chotto/token'
require_relative 'chotto/token_group'
require_relative 'chotto/message_thread'
+require_relative '../filters/mailing_lists_filter'
module Chotto
class << self
@@ -43,14 +44,14 @@ module Chotto
def close_db
db.close
end
- end
-end
-def eval_rules(options = {})
- Chotto.configure do
- config.only_new = options.fetch(:only_new, false)
+ def include_rule(rule)
+ rule.call
+ end
end
+end
+def eval_rules(_options = {})
Chotto.rule_sets.each(&:run)
Chotto.close_db
end