class Dry::Schema::Predicate::Negation

A negated predicate

@api private

Attributes

predicate[R]

@api private

Public Class Methods

new(predicate) click to toggle source

@api private

# File lib/dry/schema/predicate.rb, line 22
def initialize(predicate)
  @predicate = predicate
end

Public Instance Methods

ast(...)
Alias for: to_ast
to_ast(...) click to toggle source

Dump negated predicate to an AST

@return [Array]

@api private

# File lib/dry/schema/predicate.rb, line 31
def to_ast(...)
  [:not, predicate.to_ast(...)]
end
Also aliased as: ast