Class: BxBuilderChain::Processors::Csv
- Defined in:
- lib/bx_builder_chain/processors/csv.rb
Constant Summary collapse
- EXTENSIONS =
[".csv"]
- CONTENT_TYPES =
["text/csv"]
Instance Method Summary collapse
-
#parse(data) ⇒ Array of Hash
Parse the document and return the text.
Methods inherited from Base
Methods included from DependencyHelper
Constructor Details
This class inherits a constructor from BxBuilderChain::Processors::Base
Instance Method Details
#parse(data) ⇒ Array of Hash
Parse the document and return the text
14 15 16 17 18 |
# File 'lib/bx_builder_chain/processors/csv.rb', line 14 def parse(data) ::CSV.new(data.read, col_sep: separator).map do |row| row.map(&:strip) end end |