class Google::Cloud::Config

def validate_new_key! key

def validate_new_key! key
  key_str = key.to_s
  key = key.to_sym
  if key_str !~ /^[a-zA-Z]\w*$/ || ILLEGAL_KEYS.include?(key)
    warn! "Illegal key name: #{key_str.inspect}. Method dispatch will" \
          " not work for this key."
  end
  warn! "Key #{key.inspect} already exists. It will be replaced." if @validators.key? key
  key
end