Method: RuboCop::Cop::Offense#cop_name

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

#cop_nameString (readonly)

Returns the cop name as a String for which this offense is for.

Examples:

'Layout/LineLength'

Returns:

  • (String)

    the cop name as a String for which this offense is for.

[View source]

50
51
52
# File 'lib/rubocop/cop/offense.rb', line 50

def cop_name
  @cop_name
end