Sha256: 2c64dd753d32151387c7a0f1281b3a030eb4a1c0c9842d4c7cc5b17ddb10e9a5
Contents?: true
Size: 960 Bytes
Versions: 10
Compression:
Stored size: 960 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This module encapsulates the ability to allow certain methods when # parsing. module AllowedMethods private # @api public def allowed_method?(name) allowed_methods.include?(name.to_s) end # @deprecated Use allowed_method? instead alias ignored_method? allowed_method? # @api public def allowed_methods deprecated_values = cop_config_deprecated_values if deprecated_values.any?(Regexp) cop_config.fetch('AllowedMethods', []) else Array(cop_config['AllowedMethods']).concat(deprecated_values) end end def cop_config_deprecated_values Array(cop_config['IgnoredMethods']).concat(Array(cop_config['ExcludedMethods'])) end end # @deprecated IgnoredMethods class has been replaced with AllowedMethods. IgnoredMethods = AllowedMethods end end
Version data entries
10 entries across 10 versions & 3 rubygems