lib/pipeline.rb in ezmobius-redis-0.0.3.4 vs lib/pipeline.rb in ezmobius-redis-0.1

- old
+ new

@@ -6,26 +6,17 @@ def initialize(redis) @redis = redis @commands = [] end - - def get_response + + def call_command(command) + @commands << command end - - def write(data) - @commands << data - write_and_read if @commands.size >= BUFFER_SIZE - 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