Sha256: 6ebf126bdc32fae7e92a7e864da6b7d2ed94305611aff18c7481057b803f78a4

Contents?: true

Size: 416 Bytes

Versions: 81

Compression:

Stored size: 416 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

      # @api public
      def allowed_methods
        cop_config.fetch('AllowedMethods', [])
      end
    end
  end
end

Version data entries

81 entries across 79 versions & 8 rubygems

Version Path
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-1.31.2/lib/rubocop/cop/mixin/allowed_methods.rb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/rubocop-1.26.0/lib/rubocop/cop/mixin/allowed_methods.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-1.31.2/lib/rubocop/cop/mixin/allowed_methods.rb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-1.26.0/lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.32.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.31.2 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.31.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.31.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.30.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.30.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.29.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.29.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.28.2 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.28.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.28.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.27.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.26.1 lib/rubocop/cop/mixin/allowed_methods.rb
op_connect-0.1.2 vendor/bundle/ruby/3.1.0/gems/rubocop-1.26.0/lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.26.0 lib/rubocop/cop/mixin/allowed_methods.rb
plaid-14.13.0 vendor/bundle/ruby/3.0.0/gems/rubocop-0.91.1/lib/rubocop/cop/mixin/allowed_methods.rb