Module: Dry::Validation::PredicateRegistry::PredicateDetector

Included in:
Schema
Defined in:
lib/dry/validation/predicate_registry.rb

Instance Method Summary collapse

Instance Method Details

#method_added(name) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/dry/validation/predicate_registry.rb', line 7

def method_added(name)
  super

  if name.to_s.end_with?('?')
    registry.update(name => instance_method(name))
  end
end