Class: Fluent::TypecastFilter

Inherits:
Filter
  • Object
show all
Includes:
Fluent::TextParser::TypeConverter
Defined in:
lib/fluent/plugin/filter_typecast.rb

Instance Method Summary collapse

Instance Method Details

#filter(tag, time, record) ⇒ Object



7
8
9
10
11
12
# File 'lib/fluent/plugin/filter_typecast.rb', line 7

def filter(tag, time, record)
  filtered = record.map do |key, val|
    [key, convert_type(key, val)]
  end
  Hash[*filtered.flatten(1)]
end