Method: Bundler::Thor::Option#usage
- Defined in:
- lib/bundler/vendor/thor/lib/thor/parser/option.rb
#usage(padding = 0) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/bundler/vendor/thor/lib/thor/parser/option.rb', line 83 def usage(padding = 0) sample = if && !.to_s.empty? "#{switch_name}=#{}".dup else switch_name end sample = "[#{sample}]".dup unless required? if boolean? && name != "force" && !name.match(/\A(no|skip)[\-_]/) sample << ", [#{dasherize('no-' + human_name)}], [#{dasherize('skip-' + human_name)}]" end aliases_for_usage.ljust(padding) + sample end |