Class: Operations::Contract::MessagesResolver
- Inherits:
-
Dry::Validation::Messages::Resolver
- Object
- Dry::Validation::Messages::Resolver
- Operations::Contract::MessagesResolver
- Defined in:
- lib/operations/contract/messages_resolver.rb
Overview
Patching the default messages resolver to append ‘:code` meta to every message produced.
Instance Method Summary collapse
Instance Method Details
#call(message:, meta: Dry::Schema::EMPTY_HASH, **rest) ⇒ Object
6 7 8 9 10 |
# File 'lib/operations/contract/messages_resolver.rb', line 6 def call(message:, meta: Dry::Schema::EMPTY_HASH, **rest) = .merge(code: ) if .is_a?(Symbol) super end |