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
rubocop-1.7.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.6.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.6.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.5.2 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.5.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.5.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.4.2 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.4.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.4.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.3.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.3.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.2.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.1.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-1.0.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-0.93.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-0.93.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-0.92.0 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-0.91.1 lib/rubocop/cop/mixin/allowed_methods.rb
rubocop-0.91.0 lib/rubocop/cop/mixin/allowed_methods.rb
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/rubocop-0.90.0/lib/rubocop/cop/mixin/allowed_methods.rb