Class: FluentExt::TextParser::CSVParser

Inherits:
ValuesParser show all
Defined in:
lib/fluent/plugin/fixed_parser.rb

Instance Method Summary collapse

Methods inherited from ValuesParser

#configure, #values_map

Methods inherited from GenericParser

#parse_time

Constructor Details

#initializeCSVParser

Returns a new instance of CSVParser.


126
127
128
129
# File 'lib/fluent/plugin/fixed_parser.rb', line 126

def initialize
  super
  require 'csv'
end

Instance Method Details

#call(text) ⇒ Object


131
132
133
# File 'lib/fluent/plugin/fixed_parser.rb', line 131

def call(text)
  return parse_time(values_map(CSV.parse_line(text)))
end