Class: ActiveRecord::Refined::AST::Or
- Defined in:
- lib/active_record/refined/ast.rb
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ Or
constructor
A new instance of Or.
- #to_arel(table, model) ⇒ Object
Methods inherited from Predicate
Methods inherited from Node
Constructor Details
#initialize(left, right) ⇒ Or
Returns a new instance of Or.
1445 1446 1447 1448 |
# File 'lib/active_record/refined/ast.rb', line 1445 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
1443 1444 1445 |
# File 'lib/active_record/refined/ast.rb', line 1443 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
1443 1444 1445 |
# File 'lib/active_record/refined/ast.rb', line 1443 def right @right end |
Instance Method Details
#to_arel(table, model) ⇒ Object
1450 1451 1452 |
# File 'lib/active_record/refined/ast.rb', line 1450 def to_arel(table, model) left.to_arel(table, model).or(right.to_arel(table, model)) end |