Module: Exa::CLI::Formatters
- Defined in:
- lib/exa/cli/formatters.rb
Defined Under Namespace
Classes: BaseFormatter, JsonFormatter, JsonlFormatter, MarkdownFormatter, TableFormatter
Class Method Summary collapse
Class Method Details
.for(name) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/exa/cli/formatters.rb', line 8 def self.for(name) case name&.to_s&.downcase when "json" JsonFormatter.new when "jsonl" JsonlFormatter.new when "markdown" MarkdownFormatter.new else TableFormatter.new end end |