Sha256: 796a5d1b5b522784ef0269e8d8e190976564be15f408dd9f9ea293e8b75d87e8

Contents?: true

Size: 485 Bytes

Versions: 39

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

module Arel # :nodoc: all
  module Collectors
    class SubstituteBinds
      def initialize(quoter, delegate_collector)
        @quoter = quoter
        @delegate = delegate_collector
      end

      def <<(str)
        delegate << str
        self
      end

      def add_bind(bind)
        self << quoter.quote(bind)
      end

      def value
        delegate.value
      end

      private
        attr_reader :quoter, :delegate
    end
  end
end

Version data entries

39 entries across 39 versions & 4 rubygems

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