aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/nodes/values_list.rb
blob: 89cea1790d0d488dfe738ba0bb93c59dc66c3cc8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true
module Arel
  module Nodes
    class ValuesList < Node
      attr_reader :rows

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

      def hash
        @rows.hash
      end

      def eql? other
        self.class == other.class &&
          self.rows == other.rows
      end
      alias :== :eql?
    end
  end
end