Class: ActiveRecord::Refined::AST::Not

Inherits:
Predicate show all
Defined in:
lib/active_record/refined/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Predicate

#!, #&, #|

Methods inherited from Node

#as, #asc, #desc

Constructor Details

#initialize(operand) ⇒ Not

Returns a new instance of Not.



430
431
432
# File 'lib/active_record/refined/ast.rb', line 430

def initialize(operand)
  @operand = operand
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



428
429
430
# File 'lib/active_record/refined/ast.rb', line 428

def operand
  @operand
end

Instance Method Details

#to_arel(table) ⇒ Object



434
435
436
# File 'lib/active_record/refined/ast.rb', line 434

def to_arel(table)
  Arel::Nodes::Not.new(operand.to_arel(table))
end