class Dry::Schema::Trace
def method_missing(meth, *args, &block)
- Api: - private
def method_missing(meth, *args, &block) if meth.to_s.end_with?(QUESTION_MARK) if ::Dry::Schema::Trace::INVALID_PREDICATES.include?(meth) ::Kernel.raise InvalidSchemaError, "#{meth} predicate cannot be used in this context" end unless compiler.supports?(meth) ::Kernel.raise ::ArgumentError, "#{meth} predicate is not defined" end predicate = Predicate.new(compiler, meth, args, block) predicate.ensure_valid predicate else super end end