Sha256: 9ec03ba26f40011c291b575e241bb20b678b239cc4619946e57f408196de215c

Contents?: true

Size: 750 Bytes

Versions: 52

Compression:

Stored size: 750 Bytes

Contents

class Redis
  class Pipeline
    attr :commands

    def initialize
      @commands = []
    end

    # Starting with 2.2.1, assume that this method is called with a single
    # array argument. Check its size for backwards compat.
    def call(*args)
      if args.first.is_a?(Array) && args.size == 1
        command = args.first
      else
        command = args
      end

      @commands << command
      nil
    end

    # Assume that this method is called with a single array argument. No
    # backwards compat here, since it was introduced in 2.2.2.
    def call_without_reply(command)
      @commands.push command
      nil
    end

    def call_pipelined(commands, options = {})
      @commands.concat commands
      nil
    end
  end
end

Version data entries

52 entries across 52 versions & 6 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.5 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.4 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.3 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.2 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.1 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.7.0 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.9 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.8 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.7 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.6 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.5 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.4 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.3 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.2 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.1 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.6.0 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.5.17 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.5.16 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb
classiccms-0.5.15 vendor/bundle/gems/redis-2.2.2/lib/redis/pipeline.rb