Sha256: 7ed5d128c322f6195e3ac95a57257086e3a2d1a2fd0dc418aeaf71b86b4e660b

Contents?: true

Size: 509 Bytes

Versions: 4

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

module Arel
  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

      protected

      attr_reader :left, :right
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
spiral_form-0.1.1 vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb
spiral_form-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb
nullifyable-0.1.0 vendor/bundle/gems/arel-9.0.0/lib/arel/collectors/composite.rb
arel-9.0.0 lib/arel/collectors/composite.rb