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, #collate, #desc

Constructor Details

#initialize(operand) ⇒ Not

Returns a new instance of Not.



2398
2399
2400
# File 'lib/active_record/refined/ast.rb', line 2398

def initialize(operand)
  @operand = operand
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



2396
2397
2398
# File 'lib/active_record/refined/ast.rb', line 2396

def operand
  @operand
end

Instance Method Details

#to_arel(table, model) ⇒ Object



2402
2403
2404
# File 'lib/active_record/refined/ast.rb', line 2402

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