Sha256: e6c92f40bebc8621ae67ca4ee3b787d55cb300eed97163230823d486765592bc

Contents?: true

Size: 593 Bytes

Versions: 1

Compression:

Stored size: 593 Bytes

Contents

module Fluent
  module Mixin
    module TypeConverter
      include Configurable
      include RecordFilterMixin
      include Fluent::TextParser::TypeConverter

      attr_accessor :types, :types_delimiter, :types_label_delimiter

      def configure(conf)
        super

      end

      def filter_record(tag, time, record)
        super
        if @types
          convert_field_type!(record)
        end
      end

      def convert_field_type!(record)
        record.each { |key, value|
          record[key] = convert_type(key, value)
        }
        self
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-mixin-type-converter-0.0.4 lib/fluent/mixin/type_converter.rb