Class: Faraday::Response::CSV
- Inherits:
-
Response::Middleware
- Object
- Response::Middleware
- Faraday::Response::CSV
- Defined in:
- lib/faraday/response/csv.rb
Instance Method Summary collapse
-
#initialize(app = nil, options = {}) ⇒ CSV
constructor
A new instance of CSV.
- #parse(body) ⇒ Object
Constructor Details
#initialize(app = nil, options = {}) ⇒ CSV
Returns a new instance of CSV.
7 8 9 10 |
# File 'lib/faraday/response/csv.rb', line 7 def initialize(app = nil, = {}) super(app) = end |
Instance Method Details
#parse(body) ⇒ Object
12 13 14 15 16 |
# File 'lib/faraday/response/csv.rb', line 12 def parse(body) CSV.parse(body, ) rescue Object => err raise Faraday::Error::ParsingError.new(err) end |