operator + method

Options operator +(
  1. Options other
)

Implementation

Options operator +(Options other) {
  final result = Options();

  void mergeOption(Option option) {
    result.setOption(option.name, (option + other.getOption(option.name)).value);
  }

  options.forEach(mergeOption);

  return result;
}