acceptsValues

Helper function to define allowed values for an option or argument.

This function is meant to be used with UFCS, so that it can be placed within option definition chain.

T
acceptsValues
@safe
(
T : IEntry
)
(
,
string[] values
)

Examples

new Program("test")
    .add(new Option("s", "scope", "working scope")
        .acceptsValues(["user", "system"])
    )

See Also

EnumValidator

Meta