Class: Fluent::Plugin::RecordDemuxPickerOutput::KeyMapper
- Inherits:
-
Object
- Object
- Fluent::Plugin::RecordDemuxPickerOutput::KeyMapper
- Includes:
- Fluent::PluginHelper::RecordAccessor
- Defined in:
- lib/fluent/plugin/out_record_demux_picker.rb
Instance Attribute Summary collapse
-
#accessor ⇒ Object
readonly
Returns the value of attribute accessor.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#setter ⇒ Object
readonly
Returns the value of attribute setter.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(key, target) ⇒ KeyMapper
constructor
A new instance of KeyMapper.
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
#accessor ⇒ Object (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 |
#key ⇒ Object (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 |
#setter ⇒ Object (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 |
#target ⇒ Object (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 |