lib/em-hiredis/pubsub_client.rb
def psubscribe(pattern, proc = nil, &block)
      if cb = proc || block
        @psub_callbacks[pattern] << cb
      end
      @psubs << pattern
      raw_send_command(:psubscribe, [pattern])
      return pubsub_deferrable(pattern)
    end
def psubscribe(pattern, proc = nil, &block)
      if cb = proc || block
        @psub_callbacks[pattern] << cb
      end
      @psubs << pattern
      raw_send_command(:psubscribe, [pattern])
      return pubsub_deferrable(pattern)
    end
def psubscribe ( pattern , proc = nil , & block ) if cb = proc || block @psub_callbacks [ pattern ] << cb end @psubs << pattern raw_send_command ( :psubscribe , [ pattern ] ) return pubsub_deferrable ( pattern ) end
Pattern subscribe to a pubsub channel

 If an optional proc / block is provided then it will be called (with the
 channel name and message) when a message is received on a matching
 channel

 @return [Deferrable] Redis psubscribe call
Pattern subscribe to a pubsub channel