Class: PgEventstore::EventClassResolver
- Inherits:
-
Object
- Object
- PgEventstore::EventClassResolver
- Defined in:
- lib/pg_eventstore/event_class_resolver.rb,
sig/pg_eventstore/event_class_resolver.rbs
Instance Method Summary collapse
-
#call(event_type) ⇒ Class
@param
event_type.
Instance Method Details
#call(event_type) ⇒ Class
@param event_type
7 8 9 10 11 12 13 14 15 |
# File 'lib/pg_eventstore/event_class_resolver.rb', line 7 def call(event_type) Object.const_get(event_type) rescue NameError, TypeError PgEventstore.logger&.debug(<<~TEXT.strip) Unable to resolve class by `#{event_type}' event type. \ Picking #{Event} event class to instantiate the event. TEXT Event end |