class Thor
def help(task = nil)
def help(task = nil) if task if task.include? ?: task = self.class[task] namespace = true else task = self.class.tasks[task] end puts task.formatted_usage(namespace) puts task.description else puts "Options" puts "-------" self.class.tasks.each do |_, task| format = "%-" + (self.class.maxima.usage + self.class.maxima.opt + 4).to_s + "s" print format % ("#{task.formatted_usage}") puts task.description.split("\n").first end end end