Class: ActiveRecord::Refined::AST::And
- 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) ⇒ And
constructor
A new instance of And.
- #to_arel(table) ⇒ Object
Methods inherited from Predicate
Methods inherited from Node
Constructor Details
#initialize(left, right) ⇒ And
Returns a new instance of And.
183 184 185 186 |
# File 'lib/active_record/refined/ast.rb', line 183 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
181 182 183 |
# File 'lib/active_record/refined/ast.rb', line 181 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
181 182 183 |
# File 'lib/active_record/refined/ast.rb', line 181 def right @right end |
Instance Method Details
#to_arel(table) ⇒ Object
188 189 190 |
# File 'lib/active_record/refined/ast.rb', line 188 def to_arel(table) left.to_arel(table).and(right.to_arel(table)) end |