Class: Yes::Core::EventClassResolver::SkipValidationProxy
- Inherits:
- BasicObject
- Defined in:
- lib/yes/core/event_class_resolver.rb
Overview
Proxy that skips schema validation when deserializing events from the store, since stored events are already validated.
Instance Method Summary collapse
-
#initialize(klass) ⇒ SkipValidationProxy
constructor
A new instance of SkipValidationProxy.
-
#new(**attrs) ⇒ Yes::Core::Event
The event instance with validation skipped.
Constructor Details
#initialize(klass) ⇒ SkipValidationProxy
Returns a new instance of SkipValidationProxy.
14 15 16 |
# File 'lib/yes/core/event_class_resolver.rb', line 14 def initialize(klass) @klass = klass end |
Instance Method Details
#new(**attrs) ⇒ Yes::Core::Event
Returns the event instance with validation skipped.
20 21 22 |
# File 'lib/yes/core/event_class_resolver.rb', line 20 def new(**attrs) @klass.new(**attrs, skip_validation: true) end |