def validate_value(config, allowed_values)
      value = instance_variable_get("@#{config}")

      return unless invalid_value?(value, allowed_values)

      message = "Configuration value `#{value}` is not allowed for `#{config}`."
      raise ConfigurationError, message
    end
def validate_value(config, allowed_values)
      value = instance_variable_get("@#{config}")

      return unless invalid_value?(value, allowed_values)

      message = "Configuration value `#{value}` is not allowed for `#{config}`."
      raise ConfigurationError, message
    end
Raises an error if the setting receives an invalid value
 @param config [String] the value to be assigned
 @param allowed_values [Array] an array of allowed values for the variable
 @return [nil]