Module: MultiRedis::Extension

Defined in:
lib/multi_redis/extension.rb

Instance Method Summary collapse

Instance Method Details

#multi_redis_operation(symbol, options = {}, &block) ⇒ Object


5
6
7
8
9
10
11
# File 'lib/multi_redis/extension.rb', line 5

def multi_redis_operation symbol, options = {}, &block
  op = Operation.new options.merge(target: self), &block
  define_method symbol do |*args|
    op.execute *args
  end
  self
end