Module: Dry::Validation::PredicateSet::Methods

Defined in:
lib/dry/validation/predicate_set.rb

Instance Method Summary collapse

Instance Method Details

#import(predicate_set) ⇒ Object



11
12
13
# File 'lib/dry/validation/predicate_set.rb', line 11

def import(predicate_set)
  merge(predicate_set)
end

#predicate(name, &block) ⇒ Object



7
8
9
# File 'lib/dry/validation/predicate_set.rb', line 7

def predicate(name, &block)
  register(name) { Predicate.new(name, &block) }
end