Class: Thor
- Inherits:
-
Object
- Object
- Thor
- Defined in:
- lib/patches/thor_ext.rb
Overview
rubocop:disable all
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
4 5 6 |
# File 'lib/patches/thor_ext.rb', line 4 def exit_on_failure? true end |
.help(shell, subcommand = false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/patches/thor_ext.rb', line 8 def help(shell, subcommand = false) list = printable_commands(true, subcommand) 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 (shell) end |