Method: Redis::Client#call

Defined in:
lib/redis/client.rb

#call(command, &block) ⇒ Object



83
84
85
86
87
88
89
90
91
92
# File 'lib/redis/client.rb', line 83

def call(command, &block)
  reply = process([command]) { read }
  raise reply if reply.is_a?(CommandError)

  if block
    block.call(reply)
  else
    reply
  end
end