class Redis::Cluster

def send_pubsub_command(command, &block)

def send_pubsub_command(command, &block)
  case command[1].to_s.downcase
  when 'channels' then @node.call_all(command, &block).flatten.uniq.sort
  when 'numsub'
    @node.call_all(command, &block).reject(&:empty?).map { |e| Hash[*e] }
         .reduce({}) { |a, e| a.merge(e) { |_, v1, v2| v1 + v2 } }
  when 'numpat' then @node.call_all(command, &block).reduce(:+)
  else assign_node(command).call(command, &block)
  end
end