Sha256: f3559b4aabdd7052fde63deed86ef03b19abc957aa2b573417a9d70779a88688

Contents?: true

Size: 524 Bytes

Versions: 39

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Collectors
    class Composite
      def initialize(left, right)
        @left = left
        @right = right
      end

      def <<(str)
        left << str
        right << str
        self
      end

      def add_bind(bind, &block)
        left.add_bind bind, &block
        right.add_bind bind, &block
        self
      end

      def value
        [left.value, right.value]
      end

      private
        attr_reader :left, :right
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

Version Path
activerecord-6.0.6.1 lib/arel/collectors/composite.rb
activerecord-6.0.6 lib/arel/collectors/composite.rb
activerecord-6.0.5.1 lib/arel/collectors/composite.rb
activerecord-6.0.5 lib/arel/collectors/composite.rb
activerecord-6.0.4.8 lib/arel/collectors/composite.rb
activerecord-6.0.4.7 lib/arel/collectors/composite.rb
activerecord-6.0.4.6 lib/arel/collectors/composite.rb
activerecord-6.0.4.5 lib/arel/collectors/composite.rb
activerecord-6.0.4.4 lib/arel/collectors/composite.rb
activerecord-6.0.4.3 lib/arel/collectors/composite.rb
activerecord-6.0.4.2 lib/arel/collectors/composite.rb
activerecord-6.0.4.1 lib/arel/collectors/composite.rb
activerecord-6.0.4 lib/arel/collectors/composite.rb
activerecord-6.0.3.7 lib/arel/collectors/composite.rb
activerecord-6.0.3.6 lib/arel/collectors/composite.rb
activerecord-6.0.3.5 lib/arel/collectors/composite.rb
activerecord-6.0.3.4 lib/arel/collectors/composite.rb
activerecord-6.0.3.3 lib/arel/collectors/composite.rb
activerecord-6.0.3.2 lib/arel/collectors/composite.rb
activerecord-6.0.3.1 lib/arel/collectors/composite.rb