Skip to content

Commit 86852aa

Browse files
committed
Update README to highlight that underscores are converted to hyphens for the long accessor.
1 parent 154231a commit 86852aa

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ What this piece of code does is the following:
4848
* it creates a help message and help options, with the banner above the options
4949
* it creates a version option, which displays the given text
5050
* it creates a long accessor for each option, according to the symbol - for example `"--verbose"` for `:verbose`
51-
* it crease a short accessor, which is the first character of the long accessor (automatically resolves duplicates)
51+
* it creates a short accessor, which is the first character of the long accessor (automatically resolves duplication)
52+
* it converts under_score options in Ruby to hypenated-options for the CLI, e.g. `:plus_selection` becomes `--plus-selection`
5253
* it checks if the class of the input and the default value match
53-
* it creates a switch, if no default value exist or the default value is `true` or `false`
54-
* when value\_in\_set is given, it validates if the input value is in the given array
55-
* when value_matches is given, it validates if the input value matches the regular expression
56-
* when value_satisfies is given, it validates if the lamda or Proc evaluates to `true`, when fed with the input value
54+
* it creates a switch if no default value exist or the default value is `true` or `false`
55+
* when `value_in_set` is given, it validates if the input value is in the given array
56+
* when `value_matches` is given, it validates if the input value matches the regular expression
57+
* when `value_satisfies` is given, it validates if the lambda or Proc evaluates to `true` when fed with the input value
5758
* it stores all parsed arguments and default values in the options hash, i.e. to access the value of `:mutation` in your script, write `options[:mutation]`
5859

5960
The automatically generated help message looks like this:

0 commit comments

Comments
 (0)