module RuboCop::Cop::ForbiddenIdentifiers
This module encapsulates the ability to forbid certain identifiers in a cop.
Constants
- SIGILS
Public Instance Methods
Source
# File lib/rubocop/cop/mixin/forbidden_identifiers.rb, line 9 def forbidden_identifier?(name) name = name.to_s.delete(SIGILS) forbidden_identifiers.any? && forbidden_identifiers.include?(name) end
Source
# File lib/rubocop/cop/mixin/forbidden_identifiers.rb, line 15 def forbidden_identifiers cop_config.fetch('ForbiddenIdentifiers', []) end