Class: Hermes::Serializer

Inherits:
Object
  • Object
show all
Defined in:
lib/hermes/serializer.rb

Instance Method Summary collapse

Constructor Details

#initialize(clock: Hermes::DependenciesContainer["clock"]) ⇒ Serializer

Returns a new instance of Serializer.



8
9
10
# File 'lib/hermes/serializer.rb', line 8

def initialize(clock: Hermes::DependenciesContainer["clock"])
  @clock = clock
end

Instance Method Details

#serialize(event_payload, version) ⇒ Object



12
13
14
# File 'lib/hermes/serializer.rb', line 12

def serialize(event_payload, version)
  event_payload.merge(meta: build_meta(version))
end