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

    def run
      instance_eval(&rule)
    end
  end
end