Method: CommandLine::Option#create_opt_description
- Defined in:
- lib/commandline/optionparser/option.rb
#create_opt_description ⇒ Object
133 134 135 136 137 138 139 140 141 |
# File 'lib/commandline/optionparser/option.rb', line 133 def create_opt_description return if @properties.has_key?(:opt_description) word = @properties[:names].grep(/^--\w.+/) if word.empty? @properties[:opt_description] = "" else @properties[:opt_description] = "Sets #{word.first} to true." end end |