Module: Docscribe::CLI::Formatters
- Defined in:
- lib/docscribe/cli/formatters.rb,
lib/docscribe/cli/formatters/json.rb,
lib/docscribe/cli/formatters/text.rb,
lib/docscribe/cli/formatters/sarif.rb
Overview
Factory for output formatters.
Defined Under Namespace
Class Method Summary collapse
-
.for(format) ⇒ Docscribe::CLI::Formatters::Text, ...
Select formatter by format type.
Class Method Details
.for(format) ⇒ Docscribe::CLI::Formatters::Text, ...
Select formatter by format type.
12 13 14 15 16 17 18 19 |
# File 'lib/docscribe/cli/formatters.rb', line 12 def self.for(format) case format when :text then Text.new when :json then Json.new when :sarif then Sarif.new else raise ArgumentError, "Unknown format: #{format}" end end |