protected function execute(InputInterface $input, OutputInterface $output)
    {
        $format = $input->getOption('format');
        $scan = new \Psecio\Iniscan\Scan();
        $rules = $scan->getRules();
        $options = array();

        $format = ($format === null) ? 'console' : $format;
        $formatClass = "\\Psecio\\Iniscan\\Command\\ListCommand\\Output\\".ucwords(strtolower($format));
        if (!class_exists($formatClass)) {
            throw new \Psecio\Iniscan\Exceptions\FormatNotFoundException('Output format "'.$format.'" not found');
        }
        $outputHandler = new $formatClass($output, $options);
        return $outputHandler->render($rules);
    }