Module: Clamp::Option::Parsing

Included in:
Command
Defined in:
lib/clamp/option/parsing.rb

Constant Summary collapse

TRUTHY_ENVIRONMENT_VALUES =

For :flag options with environment variables attached, this is a list of possible values that are accepted as ‘true’

Example:

option "--foo", :flag, "Use foo", :env => "FOO"

All of these will set ‘foo’ to true:

FOO=1 ./myprogram
FOO=true ./myprogram
FOO=yes ./myprogram
FOO=on ./myprogram
FOO=enable ./myprogram

See Command.option for more information.

%w(1 yes enable on true)