summaryrefslogtreecommitdiff
path: root/lib/rbot/registry/tc.rb
diff options
context:
space:
mode:
authorMatthias H <apoc@sixserv.org>2014-03-06 16:07:13 +0100
committerMatthias H <apoc@sixserv.org>2014-03-06 16:07:13 +0100
commitbaff61847ea90195e4ef1b063e4da521e02ab9d9 (patch)
tree72e89e8c43fdeafd4bbbcc86592a706c5148d7f5 /lib/rbot/registry/tc.rb
parent15be46dbc99df42db41c247967c9c504008de5cf (diff)
[registry] improved tests, sqlite/tc bugfixes
Diffstat (limited to 'lib/rbot/registry/tc.rb')
-rw-r--r--lib/rbot/registry/tc.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/rbot/registry/tc.rb b/lib/rbot/registry/tc.rb
index 4e248f42..f1835c8a 100644
--- a/lib/rbot/registry/tc.rb
+++ b/lib/rbot/registry/tc.rb
@@ -41,6 +41,13 @@ class Registry
@registry.optimize
end
+ def delete(key)
+ return default unless dbexists?
+ value = self[key]
+ registry.delete(key.to_s)
+ value # return deleted value if success
+ end
+
end
end # Registry