aboutsummaryrefslogtreecommitdiff
path: root/lib/some/ruleset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/some/ruleset.rb')
-rw-r--r--lib/some/ruleset.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/some/ruleset.rb b/lib/some/ruleset.rb
new file mode 100644
index 0000000..6df1eff
--- /dev/null
+++ b/lib/some/ruleset.rb
@@ -0,0 +1,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