123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::Nary

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Arel::Nodes::NodeExpression
Defined in: activerecord/lib/arel/nodes/nary.rb

Class Method Summary

Instance Attribute Summary

Node - Inherited

Instance Method Summary

Constructor Details

.new(children) ⇒ Nary

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 8

def initialize(children)
  super()
  @children = children
end

Instance Attribute Details

#children (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 6

attr_reader :children

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 33

alias :== :eql?

#eql?(other) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 29

def eql?(other)
  self.class == other.class &&
    self.children == other.children
end

#fetch_attribute(&block)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 21

def fetch_attribute(&block)
  children.any? && children.all? { |child| child.fetch_attribute(&block) }
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 25

def hash
  [self.class, children].hash
end

#left

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 13

def left
  children.first
end

#right

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/nary.rb', line 17

def right
  children[1]
end