Module: Rubocop::Report

Defined in:
lib/rubocop/report/report.rb,
lib/rubocop/report/plain_text.rb,
lib/rubocop/report/emacs_style.rb

Defined Under Namespace

Classes: EmacsStyle, PlainText, Report

Class Method Summary collapse

Class Method Details

.create(file, output_mode = :default) ⇒ Report

Creates a Report object, based on the current settings

Parameters:

  • the (String)

    filename for the report

Returns:

  • (Report)

    a report object



9
10
11
12
13
14
# File 'lib/rubocop/report/report.rb', line 9

def create(file, output_mode = :default)
  case output_mode
  when :default     then PlainText.new(file)
  when :emacs_style then EmacsStyle.new(file)
  end
end