Class: Dry::Validation::Rust::MessageBackend
- Inherits:
-
Object
- Object
- Dry::Validation::Rust::MessageBackend
- Defined in:
- lib/dry/validation/rust/message_backend.rb
Overview
Adapter interface for resolving localized schema error messages.
Custom backends must inherit from this class and implement #message.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(config) ⇒ MessageBackend
constructor
Creates a backend using the schema message configuration.
-
#message(code:, predicate:, args:, type:, fallback:) ⇒ String
Resolves text for a schema error.
Constructor Details
#initialize(config) ⇒ MessageBackend
Creates a backend using the schema message configuration.
15 |
# File 'lib/dry/validation/rust/message_backend.rb', line 15 def initialize(config); end |
Instance Method Details
#message(code:, predicate:, args:, type:, fallback:) ⇒ String
Resolves text for a schema error.
25 26 27 |
# File 'lib/dry/validation/rust/message_backend.rb', line 25 def (code:, predicate:, args:, type:, fallback:) raise NotImplementedError, "#{self.class} must implement #message" end |