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.3 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.3.rc1 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.2.2 lib/arel/collectors/substitute_binds.rb
argon-1.3.1 vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/arel/collectors/substitute_binds.rb
symbolic_enum-1.1.5 vendor/bundle/ruby/2.7.0/gems/activerecord-6.0.2.1/lib/arel/collectors/substitute_binds.rb
activerecord-6.0.2.1 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.2 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.2.rc2 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.2.rc1 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.1 lib/arel/collectors/substitute_binds.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/arel/collectors/substitute_binds.rb
activerecord-6.0.1.rc1 lib/arel/collectors/substitute_binds.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/activerecord-6.0.0/lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0.rc2 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0.rc1 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0.beta3 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0.beta2 lib/arel/collectors/substitute_binds.rb
activerecord-6.0.0.beta1 lib/arel/collectors/substitute_binds.rb