]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/registry.rb
reaction: fix trigger regex to work with non-alphanumeric start/end.
[user/henk/code/ruby/rbot.git] / lib / rbot / registry.rb
index 05425341a92e682d64d8d09eeb4e58628bcbc16d..4d52bff22e35d501764f73c8ef19fff0e4d75728 100644 (file)
@@ -220,25 +220,25 @@ class Bot
     end
 
     # just like Hash#each
-    def each(&block)
+    def each(set=nil, bulk=0, &block)
       return nil unless File.exist?(@filename)
-      registry.each {|key,value|
+      registry.each(set, bulk) {|key,value|
         block.call(key, restore(value))
       }
     end
 
     # just like Hash#each_key
-    def each_key(&block)
+    def each_key(set=nil, bulk=0, &block)
       return nil unless File.exist?(@filename)
-      registry.each {|key, value|
+      registry.each_key(set, bulk) {|key|
         block.call(key)
       }
     end
 
     # just like Hash#each_value
-    def each_value(&block)
+    def each_value(set=nil, bulk=0, &block)
       return nil unless File.exist?(@filename)
-      registry.each {|key, value|
+      registry.each_value(set, bulk) { |value|
         block.call(restore(value))
       }
     end