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.



8
9
10
# File 'lib/semlogr/enrichers/property.rb', line 8

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

Instance Method Details

#enrich(log_event) ⇒ Object



12
13
14
# File 'lib/semlogr/enrichers/property.rb', line 12

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