Class: Dry::Validation::Messages::Namespaced
- Inherits:
-
Object
- Object
- Dry::Validation::Messages::Namespaced
- Defined in:
- lib/dry/validation/messages.rb
Instance Attribute Summary collapse
-
#fallback ⇒ Object
readonly
Returns the value of attribute fallback.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
Instance Method Summary collapse
-
#initialize(namespace, fallback) ⇒ Namespaced
constructor
A new instance of Namespaced.
- #lookup(*args) ⇒ Object
Constructor Details
#initialize(namespace, fallback) ⇒ Namespaced
Returns a new instance of Namespaced.
32 33 34 35 |
# File 'lib/dry/validation/messages.rb', line 32 def initialize(namespace, fallback) @namespace = namespace @fallback = fallback end |
Instance Attribute Details
#fallback ⇒ Object (readonly)
Returns the value of attribute fallback.
30 31 32 |
# File 'lib/dry/validation/messages.rb', line 30 def fallback @fallback end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
30 31 32 |
# File 'lib/dry/validation/messages.rb', line 30 def namespace @namespace end |
Instance Method Details
#lookup(*args) ⇒ Object
37 38 39 |
# File 'lib/dry/validation/messages.rb', line 37 def lookup(*args) namespace.lookup(*args) { fallback.lookup(*args) } end |