Class: Cogger::Formatters::Parsers::Dynamic

Inherits:
Object
  • Object
show all
Defined in:
lib/cogger/formatters/parsers/dynamic.rb

Overview

Dynamically extracts the universal or individual template attributes for log entry parsing.

Constant Summary collapse

DELEGATES =

Order matters.

[Universal.new, Individual.new].freeze

Instance Method Summary collapse

Constructor Details

#initialize(delegates: DELEGATES) ⇒ Dynamic

Returns a new instance of Dynamic.



11
12
13
# File 'lib/cogger/formatters/parsers/dynamic.rb', line 11

def initialize delegates: DELEGATES
  @delegates = delegates
end

Instance Method Details

#call(template) ⇒ Object



15
# File 'lib/cogger/formatters/parsers/dynamic.rb', line 15

def call(template) = parse(template) || template