lib/cl/help/cmd.rb in cl-0.1.1 vs lib/cl/help/cmd.rb in cl-0.1.2
- old
+ new
@@ -100,11 +100,14 @@
opts << "alias: #{format_aliases(opt)}" if opt.aliases?
opts << "requires: #{opt.requires.join(', ')}" if opt.requires?
opts << "default: #{format_default(opt)}" if opt.default?
opts << "known values: #{opt.enum.join(', ')}" if opt.enum?
opts << "format: #{opt.format}" if opt.format?
+ opts << "downcase: true" if opt.downcase?
opts << "max: #{opt.max}" if opt.max?
+ opts << "e.g.: #{opt.example}" if opt.example?
+ opts << "see: #{opt.see}" if opt.see?
opts << format_deprecated(opt) if opt.deprecated?
opts.compact
end
def format_aliases(opt)
@@ -116,10 +119,10 @@
end
def format_type(obj)
return obj.type unless obj.is_a?(Opt) && obj.type == :array
- "array (can be given multiple times)"
+ "array (string, can be given multiple times)"
end
def format_default(opt)
opt.default.is_a?(Symbol) ? opt.default.to_s.sub('_', ' ') : opt.default
end