summaryrefslogtreecommitdiff
path: root/lib/rbot/registry/mem.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/registry/mem.rb')
-rw-r--r--lib/rbot/registry/mem.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/rbot/registry/mem.rb b/lib/rbot/registry/mem.rb
new file mode 100644
index 00000000..85d52b15
--- /dev/null
+++ b/lib/rbot/registry/mem.rb
@@ -0,0 +1,30 @@
+#-- vim:sw=2:et
+#++
+#
+# :title: Memory registry implementation
+#
+# This is using a in-memory hash, does not persist, used for
+# tests, etc.
+#
+
+module Irc
+class Bot
+class Registry
+
+ class MemAccessor < AbstractAccessor
+
+ def registry
+ super
+ @registry = {}
+ end
+
+ def dbexists?
+ true # the memory database always exists, this way it won't create any folders on the file system
+ end
+
+ end
+
+end # Registry
+end # Bot
+end # Irc
+