Method: RuboCop::Cop::Base.match?

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

.match?(given_names) ⇒ Boolean

Returns true if the cop name or the cop namespace matches any of the given names.

Returns:

  • (Boolean)

111
112
113
114
115
# File 'lib/rubocop/cop/base.rb', line 111

def self.match?(given_names)
  return false unless given_names

  given_names.include?(cop_name) || given_names.include?(badge.department_name)
end