aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/collectors/sql_string.rb
blob: 824b0a1712777c03aa9ca8e7d4ffbe097906e7c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# encoding: utf-8

module Arel
  module Collectors
    class SQLString
      def initialize
        @str = ''
      end

      def value
        @str
      end

      def << str
        @str << str
        self
      end

      def start;  self; end
      def finish; self; end

      def add_bind bind
        self << bind
        self
      end
    end
  end
end