diff options
Diffstat (limited to 'activerecord/lib/arel/collectors/plain_string.rb')
-rw-r--r-- | activerecord/lib/arel/collectors/plain_string.rb | 20 |
1 files changed, 20 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..687d7fbf2f --- /dev/null +++ b/activerecord/lib/arel/collectors/plain_string.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +module Arel # :nodoc: all + module Collectors + class PlainString + def initialize + @str = "".dup + end + + def value + @str + end + + def <<(str) + @str << str + self + end + end + end +end |