Method: Bundler::Thor.printable_commands
- Defined in:
- lib/bundler/vendor/thor/lib/thor.rb
permalink .printable_commands(all = true, subcommand = false) ⇒ Object Also known as: printable_tasks
Returns commands ready to be printed.
309 310 311 312 313 314 315 316 317 |
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 309 def printable_commands(all = true, subcommand = false) (all ? all_commands : commands).map do |_, command| next if command.hidden? item = [] item << (command, false, subcommand) item << (command.description ? "# #{command.description.gsub(/\s+/m, ' ')}" : "") item end.compact end |