Sha256: 7aa73da766796c0264cba17397f832509fd55a5aa1f3b08f2b1770910be59730

Contents?: true

Size: 663 Bytes

Versions: 1

Compression:

Stored size: 663 Bytes

Contents

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pluginscan-0.9.0 lib/pluginscan/reports/issues_report/issues_printer_factory.rb