lib/hobo/help_formatter.rb in hobo-inviqa-0.0.14 vs lib/hobo/help_formatter.rb in hobo-inviqa-0.0.15
- old
+ new
@@ -62,10 +62,15 @@
line = padded(opt.short ? "-#{opt.short}," : "", 4)
description = opt.description
if opt.long
description += ". (Disable with --no-#{opt.long})" if opt.config[:invertable]
- value = opt.config[:argument] ? "#{opt.long.upcase}" : ""
+ case opt.config[:as].to_s.downcase
+ when 'hash'
+ value = opt.config[:argument] ? "KEY#{opt.config[:key_delimiter]}VALUE" : ""
+ else
+ value = opt.config[:argument] ? "#{opt.long.upcase}" : ""
+ end
value = "[#{value}]" if opt.accepts_optional_argument?
value = "=#{value}" unless value.empty?
line += "--#{opt.long}#{value}"
end
\ No newline at end of file