Method: RuboCop::Cop::Offense#==

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

#==(other) ⇒ Boolean Also known as: eql?

Returns ‘true` if two offenses contain same attributes

Returns:

  • (Boolean)

    returns ‘true` if two offenses contain same attributes

[View source]

210
211
212
213
214
# File 'lib/rubocop/cop/offense.rb', line 210

def ==(other)
  COMPARISON_ATTRIBUTES.all? do |attribute|
    public_send(attribute) == other.public_send(attribute)
  end
end