Sha256: b4966b78b7011283aea4bde2983beecaeeae798bf60a2261f6bb8c67a67d604a
Contents?: true
Size: 452 Bytes
Versions: 14
Compression:
Stored size: 452 Bytes
Contents
module EventSourcery module EventStore module EventTypeSerializers # Stores event types by their class name and falls back to the generic # Event class if the constant is not found class ClassName def serialize(event_class) event_class.name end def deserialize(event_type) Object.const_get(event_type) rescue NameError Event end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems