lib/cl/help/cmd.rb in cl-0.1.27 vs lib/cl/help/cmd.rb in cl-0.1.28
- old
+ new
@@ -138,9 +138,10 @@
def format_deprecated(opt)
return "deprecated (#{opt.deprecated[1]})" if opt.deprecated[0] == opt.name
end
def rjust(objs)
+ return objs unless objs.any?
width = objs.max_by(&:size).size
objs.map { |objs| [*Array.new(width - objs.size) { '' }, *objs] }
end
def indent(str)