module Bundler::Audit::CLI::Formats::JSON
def criticality_label(advisory)
def criticality_label(advisory) case advisory.criticality when :none then "none" when :low then "low" when :medium then "medium" when :high then "high" when :critical then "critical" else "unknown" end end
def print_report(report,output=$stdout)
-
output
(IO, File
) -- -
report
(Report
) --
def print_report(report,output=$stdout) hash = report.to_h if output.tty? output.puts(::JSON.pretty_generate(hash)) else output.write(::JSON.generate(hash)) end end