Class: MultiRedis::Operation::DSL

Inherits:
Object
  • Object
show all
Defined in:
lib/multi_redis/operation.rb

Instance Method Summary collapse

Constructor Details

#initialize(op) ⇒ DSL

Returns a new instance of DSL.


44
45
46
# File 'lib/multi_redis/operation.rb', line 44

def initialize op
  @op = op
end

Instance Method Details

#multi(&block) ⇒ Object


48
49
50
# File 'lib/multi_redis/operation.rb', line 48

def multi &block
  @op.add :multi, &block
end

#pipelined(&block) ⇒ Object


52
53
54
# File 'lib/multi_redis/operation.rb', line 52

def pipelined &block
  @op.add :pipelined, &block
end

#run(&block) ⇒ Object


56
57
58
# File 'lib/multi_redis/operation.rb', line 56

def run &block
  @op.add :call, &block
end