Class: Redis::Pipeline

Inherits:
Object
  • Object
show all
Defined in:
lib/redis/pipeline.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePipeline

Returns a new instance of Pipeline.



5
6
7
# File 'lib/redis/pipeline.rb', line 5

def initialize
  @commands = []
end

Instance Attribute Details

#commandsObject (readonly)

Returns the value of attribute commands.



3
4
5
# File 'lib/redis/pipeline.rb', line 3

def commands
  @commands
end

Instance Method Details

#call(*args) ⇒ Object



9
10
11
12
# File 'lib/redis/pipeline.rb', line 9

def call(*args)
  @commands << args
  nil
end

#call_pipelined(commands, options = {}) ⇒ Object



14
15
16
17
# File 'lib/redis/pipeline.rb', line 14

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