Module: Legion::Extensions::Detect::Formatters
- Defined in:
- lib/legion/extensions/detect/formatters.rb,
lib/legion/extensions/detect/formatters/json.rb,
lib/legion/extensions/detect/formatters/sarif.rb,
lib/legion/extensions/detect/formatters/markdown_pr.rb
Defined Under Namespace
Modules: Json, MarkdownPr, Sarif
Class Method Summary collapse
Class Method Details
.format(detections, format: :json) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/legion/extensions/detect/formatters.rb', line 13 def format(detections, format: :json) case format.to_sym when :sarif then Sarif.to_json(detections) when :markdown then MarkdownPr.format(detections) else Json.format(detections) end end |