Sha256: 1d9f31e92ac62ddda4824eb7bae0e5f129ad5f8a7ae4bec7b93bee8564aeb366
Contents?: true
Size: 500 Bytes
Versions: 177
Compression:
Stored size: 500 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop # This module encapsulates the ability to allow certain identifiers in a cop. module AllowedIdentifiers SIGILS = '@$' # if a variable starts with a sigil it will be removed def allowed_identifier?(name) !allowed_identifiers.empty? && allowed_identifiers.include?(name.to_s.delete(SIGILS)) end def allowed_identifiers cop_config.fetch('AllowedIdentifiers') { [] } end end end end
Version data entries
177 entries across 176 versions & 19 rubygems