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-0.90.0 lib/rubocop/cop/mixin/allowed_methods.rb