aboutsummaryrefslogblamecommitdiffstats
path: root/lib/arel/nodes/and.rb
blob: b4443c3d2760ef9f8a0734d2e34ee9a4d8968f6f (plain) (tree)
1
2
3

              
                                 
















                                                                          


       
module Arel
  module Nodes
    class And < Arel::Nodes::Node
      attr_reader :children

      def initialize children, right = nil
        unless Array === children
          warn "(#{caller.first}) AND nodes should be created with a list"
          children = [children, right]
        end
        @children = children
      end

      def left
        children.first
      end

      def right
        children[1]
      end
    end
  end
end