Sha256: 64a03dea6893daebbfdc90eccd61fc874a4a983ea26a39e336540a5cf67d47fb

Contents?: true

Size: 357 Bytes

Versions: 52

Compression:

Stored size: 357 Bytes

Contents

require 'csv'

module Para
  module Exporter
    class Csv < Table
      protected

      def generate
        CSV.generate do |csv|
          csv << headers

          resources.each do |resource|
            csv << row_for(resource)
            progress!
          end
        end
      end

      def extension
        '.csv'
      end
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/exporter/csv.rb
para-0.12.3 lib/para/exporter/csv.rb
para-0.12.2 lib/para/exporter/csv.rb
para-0.12.1 lib/para/exporter/csv.rb
para-0.12.0 lib/para/exporter/csv.rb
para-0.11.4 lib/para/exporter/csv.rb
para-0.11.3 lib/para/exporter/csv.rb
para-0.11.2 lib/para/exporter/csv.rb
para-0.11.1 lib/para/exporter/csv.rb
para-0.11.0 lib/para/exporter/csv.rb
para-0.10.0 lib/para/exporter/csv.rb
para-0.9.4 lib/para/exporter/csv.rb
para-0.9.3.3 lib/para/exporter/csv.rb
para-0.9.3.2 lib/para/exporter/csv.rb
para-0.9.3.1 lib/para/exporter/csv.rb
para-0.9.2 lib/para/exporter/csv.rb
para-0.9.0 lib/para/exporter/csv.rb
para-0.8.15 lib/para/exporter/csv.rb
para-0.8.14 lib/para/exporter/csv.rb
para-0.8.13 lib/para/exporter/csv.rb