aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/arel/collectors/plain_string.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/arel/collectors/plain_string.rb')
-rw-r--r--activerecord/lib/arel/collectors/plain_string.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/activerecord/lib/arel/collectors/plain_string.rb b/activerecord/lib/arel/collectors/plain_string.rb
new file mode 100644
index 0000000000..1e8d2a2152
--- /dev/null
+++ b/activerecord/lib/arel/collectors/plain_string.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+module Arel
+ module Collectors
+ class PlainString
+ def initialize
+ @str = ''.dup
+ end
+
+ def value
+ @str
+ end
+
+ def << str
+ @str << str
+ self
+ end
+ end
+ end
+end