Class: Fluent::ExecUtil::TSVFormatter
- Defined in:
- lib/fluent/plugin/exec_util.rb
Instance Method Summary collapse
- #call(record, out) ⇒ Object
-
#initialize(in_keys) ⇒ TSVFormatter
constructor
A new instance of TSVFormatter.
Constructor Details
#initialize(in_keys) ⇒ TSVFormatter
Returns a new instance of TSVFormatter.
99 100 101 102 |
# File 'lib/fluent/plugin/exec_util.rb', line 99 def initialize(in_keys) @in_keys = in_keys super() end |
Instance Method Details
#call(record, out) ⇒ Object
104 105 106 107 108 109 110 111 112 |
# File 'lib/fluent/plugin/exec_util.rb', line 104 def call(record, out) last = @in_keys.length-1 for i in 0..last key = @in_keys[i] out << record[key].to_s out << "\t" if i != last end out << "\n" end |