Sha256: e47df9385708a61a0b3e3b5a643641301d13c6bbb7d5fb5c9f16e9378e2c7c1a

Contents?: true

Size: 279 Bytes

Versions: 21

Compression:

Stored size: 279 Bytes

Contents

require 'csv'

module TaskwarriorWeb::Parser::Csv
  def self.parse(csv)
    rows = []
    CSV.parse(csv, :headers => true, :quote_char => "'", :header_converters => :symbol, :converters => :all) do |row|
      rows << Hash[row.headers.zip(row.fields)]
    end
    rows
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
taskwarrior-web-1.1.12 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.11 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.10 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.9 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.8 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.7 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.6 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.5 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.4 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.3 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.2 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.1 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.1.0 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.14 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.13 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.12 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.11 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.10 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.9 lib/taskwarrior-web/services/parser/csv.rb
taskwarrior-web-1.0.8 lib/taskwarrior-web/parser/csv.rb