module RuboCop::Cop::IgnoredMethods
This module encapsulates the ability to allow certain methods when parsing.
Private Instance Methods
allowed_method?(name)
click to toggle source
@api public
# File lib/rubocop/cop/mixin/allowed_methods.rb, line 11 def allowed_method?(name) allowed_methods.include?(name.to_s) end
Also aliased as: ignored_method?
allowed_methods()
click to toggle source
@api public
# File lib/rubocop/cop/mixin/allowed_methods.rb, line 19 def allowed_methods if cop_config_deprecated_values.any?(Regexp) cop_config_allowed_methods else cop_config_allowed_methods + cop_config_deprecated_values end end
cop_config_allowed_methods()
click to toggle source
# File lib/rubocop/cop/mixin/allowed_methods.rb, line 27 def cop_config_allowed_methods @cop_config_allowed_methods ||= Array(cop_config.fetch('AllowedMethods', [])) end
cop_config_deprecated_values()
click to toggle source
# File lib/rubocop/cop/mixin/allowed_methods.rb, line 31 def cop_config_deprecated_values @cop_config_deprecated_values ||= Array(cop_config.fetch('IgnoredMethods', [])) + Array(cop_config.fetch('ExcludedMethods', [])) end