Class: Yes::Core::EncryptionMetadata
- Inherits:
-
Object
- Object
- Yes::Core::EncryptionMetadata
- Defined in:
- lib/yes/core/encryption_metadata.rb
Overview
Extracts encryption metadata from a command/event’s encryption schema.
Instance Method Summary collapse
-
#call ⇒ Hash
The encryption metadata (key, attributes) or empty hash.
Instance Method Details
#call ⇒ Hash
Returns the encryption metadata (key, attributes) or empty hash.
12 13 14 15 16 17 18 19 |
# File 'lib/yes/core/encryption_metadata.rb', line 12 def call return {} unless schema { key: schema[:key].call(data), attributes: schema[:attributes].map(&:to_sym) } end |