Class: Arel::Nodes::And
- Defined in:
- lib/ransack/adapters/active_record/3.0/compat.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
Instance Method Summary collapse
-
#initialize(children, right = nil) ⇒ And
constructor
A new instance of And.
- #left ⇒ Object
- #right ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(children, right = nil) ⇒ And
Returns a new instance of And.
43 44 45 46 47 48 |
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 43 def initialize children, right = nil unless Array === children children = [children, right] end @children = children end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
41 42 43 |
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 41 def children @children end |
Instance Method Details
#left ⇒ Object
50 51 52 |
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 50 def left children.first end |
#right ⇒ Object
54 55 56 |
# File 'lib/ransack/adapters/active_record/3.0/compat.rb', line 54 def right children[1] end |