Class: Fluent::Plugin::RecordDemuxPickerOutput::KeyMapper

Inherits:
Object
  • Object
show all
Includes:
Fluent::PluginHelper::RecordAccessor
Defined in:
lib/fluent/plugin/out_record_demux_picker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, target) ⇒ KeyMapper

Returns a new instance of KeyMapper.



125
126
127
128
129
130
# File 'lib/fluent/plugin/out_record_demux_picker.rb', line 125

def initialize(key, target)
  @key = key
  @accessor = record_accessor_create(key)
  @target = target
  @target ||= @accessor.keys.is_a?(Array) ? @accessor.keys.last : @accessor.keys
end

Instance Attribute Details

#accessorObject (readonly)

Returns the value of attribute accessor.



123
124
125
# File 'lib/fluent/plugin/out_record_demux_picker.rb', line 123

def accessor
  @accessor
end

#keyObject (readonly)

Returns the value of attribute key.



123
124
125
# File 'lib/fluent/plugin/out_record_demux_picker.rb', line 123

def key
  @key
end

#setterObject (readonly)

Returns the value of attribute setter.



123
124
125
# File 'lib/fluent/plugin/out_record_demux_picker.rb', line 123

def setter
  @setter
end

#targetObject (readonly)

Returns the value of attribute target.



123
124
125
# File 'lib/fluent/plugin/out_record_demux_picker.rb', line 123

def target
  @target
end