]> git.saurik.com Git - redis.git/blobdiff - client-libraries/ruby/lib/pipeline.rb
EXPIRE behaviour changed a bit, a negative TTL or an EXPIREAT with unix time in the...
[redis.git] / client-libraries / ruby / lib / pipeline.rb
index f92b96db527f97223c7b54ff20d63d3da4f504dc..acab5acc5c7e2c434424cfed314e21e055d21a42 100644 (file)
@@ -8,19 +8,13 @@ class Redis
       @redis = redis
       @commands = []
     end
-    
-    def execute_command(data)
-      @commands << data
-      write_and_read if @commands.size >= BUFFER_SIZE
-    end
-    
-    def finish
-      write_and_read
+   
+    def call_command(command)
+      @commands << command
     end
-    
-    def write_and_read
-      @redis.execute_command(@commands.join, true)
-      @redis.read_socket
+
+    def execute
+      @redis.call_command(@commands)
       @commands.clear
     end