123456789_123456789_123456789_123456789_123456789_

Module: RuboCop::Cop::AllowedIdentifiers

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/rubocop/cop/mixin/allowed_identifiers.rb

Overview

This module encapsulates the ability to allow certain identifiers in a cop.

Constant Summary

Instance Method Summary

Instance Method Details

#allowed_identifier?(name) ⇒ Boolean

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/allowed_identifiers.rb', line 9

def allowed_identifier?(name)
  !allowed_identifiers.empty? && allowed_identifiers.include?(name.to_s.delete(SIGILS))
end

#allowed_identifiers

[ GitHub ]

  
# File 'lib/rubocop/cop/mixin/allowed_identifiers.rb', line 13

def allowed_identifiers
  cop_config.fetch('AllowedIdentifiers') { [] }
end