aboutsummaryrefslogtreecommitdiff
path: root/lib/osugiru/ruleset.rb
blob: a9bac163a55a78107b431278aa9815ddfb6832fd (plain)
1
2
3
4
5
6
7
8
9
10
11
module Osugiru
  RuleSet = Struct.new(:name, :rule) do
    def messages
      Messages.new(db: Osugiru.db)
    end

    def run
      instance_eval(&rule)
    end
  end
end