X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/57172ffb316b5e681c4f515927894f5129739237..cd19463854027eb7e378bcd0ea8e072e7d17f4d0:/client-libraries/ruby/lib/pipeline.rb diff --git a/client-libraries/ruby/lib/pipeline.rb b/client-libraries/ruby/lib/pipeline.rb index deaedd15..acab5acc 100644 --- a/client-libraries/ruby/lib/pipeline.rb +++ b/client-libraries/ruby/lib/pipeline.rb @@ -8,24 +8,15 @@ class Redis @redis = redis @commands = [] end - - def get_response - end - - def write(data) - @commands << data - write_and_read if @commands.size >= BUFFER_SIZE + + def call_command(command) + @commands << command end - - def finish - write_and_read - end - - def write_and_read - @redis.write @commands.join - @redis.read_socket + + def execute + @redis.call_command(@commands) @commands.clear end end -end \ No newline at end of file +end