Class: Seafoam::Formatters::Json::ListFormatter
- Inherits:
-
Base::ListFormatter
- Object
- Base::ListFormatter
- Seafoam::Formatters::Json::ListFormatter
- Defined in:
- lib/seafoam/formatters/json.rb
Overview
A JSON-based formatter for the ‘list` command.
Instance Attribute Summary
Attributes inherited from Base::ListFormatter
Instance Method Summary collapse
Methods inherited from Base::ListFormatter
Constructor Details
This class inherits a constructor from Seafoam::Formatters::Base::ListFormatter
Instance Method Details
#format ⇒ Object
57 58 59 60 61 62 63 64 65 |
# File 'lib/seafoam/formatters/json.rb', line 57 def format entries.map do |entry| { graph_index: entry.index, graph_file: entry.file, graph_name_components: entry.graph_name_components, } end.to_json end |