Class: EventStoreClient::GRPC::Shared::Streams::ProcessResponse
- Inherits:
-
Object
- Object
- EventStoreClient::GRPC::Shared::Streams::ProcessResponse
- Defined in:
- lib/event_store_client/adapters/grpc/shared/streams/process_response.rb
Instance Method Summary collapse
- #call(response, skip_deserialization, skip_decryption) ⇒ EventStoreClient::DeserializedEvent, ... private
-
#initialize(config:) ⇒ ProcessResponse
constructor
A new instance of ProcessResponse.
Constructor Details
#initialize(config:) ⇒ ProcessResponse
Returns a new instance of ProcessResponse.
12 13 14 |
# File 'lib/event_store_client/adapters/grpc/shared/streams/process_response.rb', line 12 def initialize(config:) @config = config end |
Instance Method Details
#call(response, skip_deserialization, skip_decryption) ⇒ EventStoreClient::DeserializedEvent, ...
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 25 26 27 28 29 |
# File 'lib/event_store_client/adapters/grpc/shared/streams/process_response.rb', line 22 def call(response, skip_deserialization, skip_decryption) non_existing_stream = response.stream_not_found&.stream_identifier&.stream_name raise StreamNotFoundError, non_existing_stream if non_existing_stream return response if skip_deserialization return unless response.event&.event config.mapper.deserialize(response.event.event, skip_decryption: skip_decryption) end |