DartdocOption<T> constructor

DartdocOption<T>(
  1. String name,
  2. T defaultsTo,
  3. String help,
  4. OptionKind optionIs,
  5. bool mustExist,
  6. ConvertYamlToType<T> _convertYamlToType,
  7. ResourceProvider resourceProvider
)

Implementation

DartdocOption(this.name, this.defaultsTo, this.help, this.optionIs,
    this.mustExist, this._convertYamlToType, this.resourceProvider) {
  if (isDir || isFile || isGlob) {
    assert(_isString || _isListString || _isMapString);
  }
  if (mustExist) {
    // Globs by definition don't have to exist.
    assert(isDir || isFile);
  }
}