Class: Necropsy::Reporter
- Inherits:
-
Object
- Object
- Necropsy::Reporter
- Defined in:
- lib/necropsy/reporter.rb
Instance Method Summary collapse
-
#initialize(report) ⇒ Reporter
constructor
A new instance of Reporter.
- #render(format: :human, min_confidence: :low) ⇒ Object
Constructor Details
#initialize(report) ⇒ Reporter
Returns a new instance of Reporter.
5 6 7 |
# File 'lib/necropsy/reporter.rb', line 5 def initialize(report) @report = report end |
Instance Method Details
#render(format: :human, min_confidence: :low) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/necropsy/reporter.rb', line 9 def render(format: :human, min_confidence: :low) case format.to_sym when :json report.to_json when :sarif render_sarif(min_confidence) when :github, :annotations render_github_annotations(min_confidence) when :yaml, :yml report.to_yaml else render_human(min_confidence) end end |