Module: Bootprint::Formatters
- Defined in:
- lib/bootprint/formatters.rb,
lib/bootprint/formatters/json.rb,
lib/bootprint/formatters/human.rb,
lib/bootprint/formatters/sarif.rb,
lib/bootprint/formatters/markdown.rb
Defined Under Namespace
Classes: Human, JSON, Markdown, Sarif
Class Method Summary collapse
Class Method Details
.render(format, report, color: false) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/bootprint/formatters.rb', line 12 def render(format, report, color: false) case format.to_s when "human" then Human.new(report, color:).render when "json" then JSON.new(report).render when "sarif" then Sarif.new(report).render when "markdown" then Markdown.new(report).render else raise ConfigurationError, "Unknown format #{format.inspect}; use human, json, sarif, or markdown" end end |