Class: Fluent::Parser

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/fluent/parser.rb

Constant Summary

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configurable

#config, included, lookup_type, register_type

Constructor Details

#initializeParser

Returns a new instance of Parser.



42
43
44
45
# File 'lib/fluent/parser.rb', line 42

def initialize
  super
  @estimate_current_event = true
end

Instance Attribute Details

#estimate_current_eventObject

SET false BEFORE CONFIGURE, to return nil when time not parsed ‘configure()’ may raise errors for unexpected configurations



38
39
40
# File 'lib/fluent/parser.rb', line 38

def estimate_current_event
  @estimate_current_event
end

Instance Method Details

#call(*a, &b) ⇒ Object

Keep backward compatibility for existing plugins



56
57
58
# File 'lib/fluent/parser.rb', line 56

def call(*a, &b)
  parse(*a, &b)
end

#configure(conf) ⇒ Object



47
48
49
# File 'lib/fluent/parser.rb', line 47

def configure(conf)
  super
end

#parse(text) ⇒ Object

Raises:

  • (NotImplementedError)


51
52
53
# File 'lib/fluent/parser.rb', line 51

def parse(text)
  raise NotImplementedError, "Implement this method in child class"
end