lib/thor.rb in atli-0.1.5 vs lib/thor.rb in atli-0.1.6
- old
+ new
@@ -1,11 +1,10 @@
require "set"
require 'nrser'
require 'semantic_logger'
require "thor/base"
-using NRSER
class Thor
class << self
# Allows for custom "Command" package naming.
@@ -187,13 +186,11 @@
#
# basename cmd ARGS...
#
# which, of course, doesn't work if +cmd+ is inside +subcmd+.
#
- # @return [void]
- # *Atli* - as far as I can tell, this method just writes to STDOUT
- # and the return value is not / should not be used for anything.
+ # @return [nil]
#
def command_help(shell, command_name, subcommand = false)
meth = normalize_command_name(command_name)
command = all_commands[meth]
handle_no_command_error(meth) unless command
@@ -206,16 +203,18 @@
shell.say "Description:"
shell.print_wrapped(command.long_description, :indent => 2)
else
shell.say command.description
end
+
+ nil
end
alias_method :task_help, :command_help
# Prints help information for this class.
#
- # ==== Parameters
- # shell<Thor::Shell>
+ # @param [Thor::Shell] shell
+ # @return (see Thor::Base::ClassMethods#class_options_help)
#
def help(shell, subcommand = false)
list = printable_commands(true, subcommand)
Thor::Util.thor_classes_in(self).each do |klass|
list += klass.printable_commands(false)