Method: RuboCop::Cop::Offense#initialize

Defined in:
lib/rubocop/cop/offense.rb

#initialize(severity, location, message, cop_name, status = :uncorrected, corrector = nil) ⇒ Offense

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Offense.

[View source]

83
84
85
86
87
88
89
90
91
92
# File 'lib/rubocop/cop/offense.rb', line 83

def initialize(severity, location, message, cop_name, # rubocop:disable Metrics/ParameterLists
               status = :uncorrected, corrector = nil)
  @severity = RuboCop::Cop::Severity.new(severity)
  @location = location
  @message = message.freeze
  @cop_name = cop_name.freeze
  @status = status
  @corrector = corrector
  freeze
end