diff options
author | Matthias H <apoc@sixserv.org> | 2014-02-24 04:45:28 +0100 |
---|---|---|
committer | Matthias H <apoc@sixserv.org> | 2014-02-24 04:45:28 +0100 |
commit | 5512a41c689e231cee170fce3cfd015384921b47 (patch) | |
tree | ca1e4d95bf9752f45cb641ccc3ee65845cf45dab /lib/rbot/plugins.rb | |
parent | 193edc468636e40ae21d1f0ea299f8eb0927ebba (diff) |
[registry] refactoring into a abstract and factory
* a new abstract class AbstractAccessor is the new base
for all concrete database implementations.
* a factory now, dynamically discovers those implementations
in the registry/ directory and will create the configured
type for the plugins.
* again: this makes db keys case-sensitive (aka 'the correct
way of doing things' -.-)
* re-added tokyocabinet
Diffstat (limited to 'lib/rbot/plugins.rb')
-rw-r--r-- | lib/rbot/plugins.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb index a05a5b8f..c499fd40 100644 --- a/lib/rbot/plugins.rb +++ b/lib/rbot/plugins.rb @@ -187,7 +187,7 @@ module Plugins @botmodule_triggers = Array.new @handler = MessageMapper.new(self) - @registry = Registry::Accessor.new(@bot, self.class.to_s.gsub(/^.*::/, "")) + @registry = @bot.registry_factory.create(@bot.path, self.class.to_s.gsub(/^.*::/, '')) @manager.add_botmodule(self) if self.respond_to?('set_language') |