require 'pluginscan/reports/issues_report/issues_printer' require 'pluginscan/reports/issues_report/error_list_printer' module Pluginscan # Responsible for creating an object which can print out the list of issues # in one of several different ways class IssuesPrinterFactory def self.create_printer(issues_format, hide_ignores = false, output = $stdout) case issues_format when :report IssuesPrinter.new(hide_ignores, output) when :error_list ErrorListPrinter.new(hide_ignores, output) else fail Pluginscan::UnknownIssuesFormat, "Unknown issues formatter '#{issues_format}'" end end end end