Class: Exa::CLI::Formatters::JsonlFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- Exa::CLI::Formatters::JsonlFormatter
- Defined in:
- lib/exa/cli/formatters.rb
Instance Method Summary collapse
Instance Method Details
#render(cli:, payload:, collection:) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/exa/cli/formatters.rb', line 40 def render(cli:, payload:, collection:) items = collection && !collection.empty? ? collection : [payload] items.each do |item| cli.say JSON.generate(serialize(cli, item)) end end |