class Fluent::Plugin::TSVParser
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::Plugin::Parser#configure
# File lib/fluent/plugin/parser_tsv.rb, line 29 def configure(conf) super @key_num = @keys.length end
parse(text) { |time, record| ... }
click to toggle source
# File lib/fluent/plugin/parser_tsv.rb, line 34 def parse(text) values = text.split(@delimiter, @key_num) r = Hash[@keys.zip(values)] time, record = convert_values(parse_time(r), r) yield time, record end