Class: Fluent::TextParser::TSVParser
- Inherits:
-
ValuesParser
- Object
- Parser
- ValuesParser
- Fluent::TextParser::TSVParser
- Defined in:
- lib/fluent/parser.rb
Constant Summary
Constants included from TypeConverter
Fluent::TextParser::TypeConverter::Converters
Constants included from Configurable
Configurable::CONFIG_TYPE_REGISTRY
Instance Attribute Summary
Attributes inherited from Parser
Instance Method Summary collapse
Methods inherited from ValuesParser
Methods included from TypeConverter
Methods inherited from Parser
Methods included from Configurable
#config, included, #initialize, lookup_type, register_type
Constructor Details
This class inherits a constructor from Fluent::Parser
Instance Method Details
#configure(conf) ⇒ Object
392 393 394 395 |
# File 'lib/fluent/parser.rb', line 392 def configure(conf) super @key_num = @keys.length end |
#parse(text) ⇒ Object
397 398 399 400 401 402 403 |
# File 'lib/fluent/parser.rb', line 397 def parse(text) if block_given? yield values_map(text.split(@delimiter, @key_num)) else return values_map(text.split(@delimiter, @key_num)) end end |