class Rubocop::Formatter::FormatterSet

def add_formatter(formatter_type, output_path = nil)

def add_formatter(formatter_type, output_path = nil)
  formatter_class = case formatter_type
                    when Class
                      formatter_type
                    when /\A[A-Z]/
                      custom_formatter_class(formatter_type)
                    else
                      builtin_formatter_class(formatter_type)
                    end
  output = output_path ? File.open(output_path, 'w') : $stdout
  self << formatter_class.new(output)
end