Method: Ark::CLI::Option#header
- Defined in:
- lib/ark/cli/option.rb
#header ⇒ Object
Return basic usage information: the option’s names and arguments
92 93 94 95 96 97 98 99 100 |
# File 'lib/ark/cli/option.rb', line 92 def header() if self.flag? args = '' else args = ' ' + @args.map {|a| a.name }.join(', ').upcase end short = @short ? "-#{@short} " : '' return "#{short}--#{@long}#{args}" end |