Class: IV::CLI::Formatter::CSV
- Defined in:
- lib/iv-cli/formatters/csv.rb
Constant Summary collapse
- SEPARATOR =
','
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::SubclassRegistration
Methods included from Helpers::Errors
Constructor Details
This class inherits a constructor from IV::CLI::Formatter::Base
Instance Method Details
#output_rows(list) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/iv-cli/formatters/csv.rb', line 9 def output_rows(list) line = [] list.each do |row| [:columns].each do |column| line << row[column] end STDOUT.puts line.join(SEPARATOR).gsub(IV::CLI::Formatter::COLOR_REGEX,'') line.slice!(0..-1) end end |