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>



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# File 'lib/bundler/vendor/thor/lib/thor.rb', line 195

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
  list.sort! { |a, b| a[0] <=> b[0] }

  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)
end