Revert to RelatedModules and handle Array/Hash

master
William Vu 2019-04-24 11:26:52 -05:00
parent 00cebda89e
commit 0ad5dca9fa
1 changed files with 11 additions and 3 deletions

View File

@ -686,16 +686,24 @@ class ReadableText
when 'NOCVE'
output << "CVE not available:\n" \
"#{indent}#{val}\n"
when 'RELATED'
when 'RelatedModules'
output << "Related modules:\n"
val.each { |related| output << "#{indent}#{related}\n" }
when 'Stability', 'SideEffects', 'Reliability'
# Handled by dump_traits
next
else
# Display the raw note
output << "#{name}:\n" \
"#{indent}#{val}\n"
case val
when Array
val.each { |v| output << "#{indent}#{v}\n" }
when Hash
val.each { |k, v| output << "#{indent}#{k}: #{v}\n" }
else
# Display the raw note
output << "#{indent}#{val}\n"
end
end
output << "\n"