Class: ActiveRecord::Refined::AST::And

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) ⇒ And

Returns a new instance of And.



300
301
302
303
# File 'lib/active_record/refined/ast.rb', line 300

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

Instance Attribute Details

#leftObject (readonly)

Returns the value of attribute left.



298
299
300
# File 'lib/active_record/refined/ast.rb', line 298

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



298
299
300
# File 'lib/active_record/refined/ast.rb', line 298

def right
  @right
end

Instance Method Details

#to_arel(table) ⇒ Object



305
306
307
# File 'lib/active_record/refined/ast.rb', line 305

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