Class: Semlogr::Enrichers::Property

Inherits:
Object
  • Object
show all
Defined in:
lib/semlogr/enrichers/property.rb

Instance Method Summary collapse

Constructor Details

#initialize(**properties) ⇒ Property

Returns a new instance of Property.



6
7
8
# File 'lib/semlogr/enrichers/property.rb', line 6

def initialize(**properties)
  @properties = properties
end

Instance Method Details

#enrich(log_event) ⇒ Object



10
11
12
# File 'lib/semlogr/enrichers/property.rb', line 10

def enrich(log_event)
  log_event.add_property_if_absent(@properties)
end