summaryrefslogtreecommitdiff
path: root/lib/rbot/registry/tc.rb
diff options
context:
space:
mode:
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