module RuboCop::Cop::AllowedIdentifiers
This module encapsulates the ability to allow certain identifiers in a cop.
Constants
- SIGILS
Public Instance Methods
allowed_identifier?(name)
click to toggle source
# File lib/rubocop/cop/mixin/allowed_identifiers.rb, line 9 def allowed_identifier?(name) allowed_identifiers.include?(name.to_s.delete(SIGILS)) end
allowed_identifiers()
click to toggle source
# File lib/rubocop/cop/mixin/allowed_identifiers.rb, line 13 def allowed_identifiers cop_config.fetch('AllowedIdentifiers', []) end