Sha256: f22e2a1e4b3d1bf664f489c39021fb1c802d7f5de9d47b6a0f6284ed42c654aa

Contents?: true

Size: 341 Bytes

Versions: 3

Compression:

Stored size: 341 Bytes

Contents

require 'faraday'

module Faraday
  class Response::CSV < Response::Middleware
    dependency 'csv'

    def initialize(app = nil, options = {})
      super(app)
      @options = options
    end

    def parse(body)
      CSV.parse(body, @options)
    rescue Object => err
      raise Faraday::Error::ParsingError.new(err)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
faraday_csv-0.0.3 lib/faraday/response/csv.rb
faraday_csv-0.0.2 lib/faraday/response/csv.rb
faraday_csv-0.0.1 lib/faraday/response/csv.rb