Class: EacCli::RunnerWith::OutputItem::CsvFormatter
- Inherits:
-
BaseFormatter
- Object
- BaseFormatter
- EacCli::RunnerWith::OutputItem::CsvFormatter
- Defined in:
- lib/eac_cli/runner_with/output_item/csv_formatter.rb
Constant Summary collapse
- COLUMNS =
%w[key value].freeze
Instance Method Summary collapse
Instance Method Details
#to_output ⇒ String
14 15 16 17 18 19 |
# File 'lib/eac_cli/runner_with/output_item/csv_formatter.rb', line 14 def to_output ::CSV.generate do |csv| csv << COLUMNS item_hash.each { |k, v| csv << [k, v] } end end |