Method: Bundler::Thor.help

Defined in:
lib/bundler/vendor/thor/lib/thor.rb

.help(shell, subcommand = false) ⇒ Object

Prints help information for this class.

Parameters

shell<Bundler::Thor::Shell>

[View source]

288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 288

def help(shell, subcommand = false)
  list = printable_commands(true, subcommand)
  Bundler::Thor::Util.thor_classes_in(self).each do |klass|
    list += klass.printable_commands(false)
  end
  sort_commands!(list)

  if defined?(@package_name) && @package_name
    shell.say "#{@package_name} commands:"
  else
    shell.say "Commands:"
  end

  shell.print_table(list, indent: 2, truncate: true)
  shell.say
  class_options_help(shell)
  print_exclusive_options(shell)
  print_at_least_one_required_options(shell)
end