]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blob - lib/rbot/registry/mem.rb
registry: add in-memory implementation for tests
[user/henk/code/ruby/rbot.git] / lib / rbot / registry / mem.rb
1 #-- vim:sw=2:et
2 #++
3 #
4 # :title: Memory registry implementation
5 #
6 # This is using a in-memory hash, does not persist, used for
7 # tests, etc.
8 #
9
10 module Irc
11 class Bot
12 class Registry
13
14   class MemAccessor < AbstractAccessor
15
16     def registry
17       super
18       @registry = {}
19     end
20
21     def dbexists?
22       true  # the memory database always exists, this way it won't create any folders on the file system
23     end
24
25   end
26
27 end # Registry
28 end # Bot
29 end # Irc
30