class Fluent::RecordMapFilter
Constants
- PARAM_INDICES
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
# File lib/fluent/plugin/filter_record_map.rb, line 24 def configure(conf) super @context = Context.new @maps = [] @hostname = Socket.gethostname PARAM_INDICES.each do |i| expr = instance_variable_get("@map#{i}") @maps << expr if expr end end
filter(tag, time, record)
click to toggle source
# File lib/fluent/plugin/filter_record_map.rb, line 36 def filter(tag, time, record) bind = @context.context(tag, time, record, @hostname) @maps.each do |expr| eval(expr, bind) end eval('new_record', bind) end