Sha256: 4a4f3df22a5872b4f189d92e4a5382e12e08930d86350b8130155df76b262105

Contents?: true

Size: 225 Bytes

Versions: 9

Compression:

Stored size: 225 Bytes

Contents

require 'csv'

class CliFormat::Presenter
  class Csv < Base
    def text
      CSV.generate do |csv|
        csv << @header if @header
        @rows.each do |row|
          csv << row
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cli-format-0.6.1 lib/cli_format/presenter/csv.rb
cli-format-0.6.0 lib/cli_format/presenter/csv.rb
cli-format-0.5.0 lib/cli_format/presenter/csv.rb
cli-format-0.4.0 lib/cli_format/presenter/csv.rb
cli-format-0.3.0 lib/cli_format/presenter/csv.rb
cli-format-0.2.2 lib/cli_format/presenter/csv.rb
cli-format-0.2.1 lib/cli_format/presenter/csv.rb
cli-format-0.2.0 lib/cli_format/presenter/csv.rb
cli-format-0.1.0 lib/cli_format/presenter/csv.rb