Class: ActiveRecord::Refined::AST::Or

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(left, right) ⇒ Or

Returns a new instance of Or.



757
758
759
760
# File 'lib/active_record/refined/ast.rb', line 757

def initialize(left, right)
  @left = left
  @right = right
end

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



755
756
757
# File 'lib/active_record/refined/ast.rb', line 755

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



755
756
757
# File 'lib/active_record/refined/ast.rb', line 755

def right
  @right
end

Instance Method Details

#to_arel(table) ⇒ Object



762
763
764
# File 'lib/active_record/refined/ast.rb', line 762

def to_arel(table)
  left.to_arel(table).or(right.to_arel(table))
end