Sha256: 20dc2e6ba15268ca1e1bc9af05dcb07e27fa70bd053acece108ec3d9edfb4b8a

Contents?: true

Size: 500 Bytes

Versions: 5

Compression:

Stored size: 500 Bytes

Contents

# frozen_string_literal: true
module Arel
  module Nodes
    class And < Arel::Nodes::Node
      attr_reader :children

      def initialize children
        super()
        @children = children
      end

      def left
        children.first
      end

      def right
        children[1]
      end

      def hash
        children.hash
      end

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

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
spiral_form-0.1.1 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/and.rb
spiral_form-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/and.rb
nullifyable-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/nodes/and.rb
arel-9.0.0 lib/arel/nodes/and.rb
arel-8.0.0 lib/arel/nodes/and.rb