realbluesky/SoundDart — pull request #2 by seaneagan (2014-04-19 04:56:38+00:00)
Title: Use int/double auto-parsing and allowed values

Note: I didn't test this, and didn't update README, but here's some other stuff unscripted provides that you can take advantage of:

Type annotating parameters with types that have a static `parse` method will automatically use that to validate and parse the argument, and display an error and help text if an invalid value was passed. So in this case `int.parse` and `double.parse` will be used.

`allowed` specifies the allowed values of an option, which will also display an error on an invalid value, and will show up in the help. Can pass a List or a Map from values to help text for each value.

Either type annotating an option as a List, or specifying `allowMultiple` will mean you can specify option multiple times on the command line, and they will be passed to the function as a List. I filed a bug for unscripted to support comma separated values:

https://github.com/seaneagan/unscripted/issues/49