lib/oxblood/pipeline.rb in oxblood-0.1.0.dev3 vs lib/oxblood/pipeline.rb in oxblood-0.1.0.dev4

- old
+ new

@@ -1,7 +1,5 @@ -require 'oxblood/command' - module Oxblood class Pipeline < Session def initialize(connection) super @commands = Array.new @@ -10,10 +8,11 @@ def run(command) @commands << command end def sync - @connection.write(@commands.join) + serialized_commands = @commands.map { |c| serialize(command) } + @connection.write(serialized_commands.join) @connection.read_responses(@commands.size) end end end