Class: Semlogr::Enrichers::Property
- Inherits:
-
Object
- Object
- Semlogr::Enrichers::Property
- Defined in:
- lib/semlogr/enrichers/property.rb
Instance Method Summary collapse
- #enrich(log_event) ⇒ Object
-
#initialize(**properties) ⇒ Property
constructor
A new instance of Property.
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 |