class Dry::Validation::PredicateRegistry
Predicate registry with additional needed methods.
Constants
- WHITELIST
List of predicates to be imported by `:predicates_as_macros` extension.
Public Instance Methods
arg_names(name)
click to toggle source
@api private
# File lib/dry/validation/extensions/predicates_as_macros.rb, line 21 def arg_names(name) arg_list(name).map(&:first) end
call(name, args)
click to toggle source
@api private
# File lib/dry/validation/extensions/predicates_as_macros.rb, line 26 def call(name, args) self[name].(*args) end
message_opts(name, arg_values)
click to toggle source
@api private
# File lib/dry/validation/extensions/predicates_as_macros.rb, line 31 def message_opts(name, arg_values) arg_names(name).zip(arg_values).to_h end