aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/collectors/bind.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/collectors/bind.rb')
-rw-r--r--lib/arel/collectors/bind.rb23
1 files changed, 5 insertions, 18 deletions
diff --git a/lib/arel/collectors/bind.rb b/lib/arel/collectors/bind.rb
index dfa79d1001..d816aed90d 100644
--- a/lib/arel/collectors/bind.rb
+++ b/lib/arel/collectors/bind.rb
@@ -1,36 +1,23 @@
# frozen_string_literal: true
+
module Arel
module Collectors
class Bind
def initialize
- @parts = []
+ @binds = []
end
def << str
- @parts << str
self
end
def add_bind bind
- @parts << bind
+ @binds << bind
self
end
- def value; @parts; end
-
- def substitute_binds bvs
- bvs = bvs.dup
- @parts.map do |val|
- if Arel::Nodes::BindParam === val
- bvs.shift
- else
- val
- end
- end
- end
-
- def compile bvs
- substitute_binds(bvs).join
+ def value
+ @binds
end
end
end