Class: Arel::Collectors::SQLString

Inherits:
PlainString show all
Defined in:
activerecord/lib/arel/collectors/sql_string.rb

Instance Method Summary collapse

Methods inherited from PlainString

#<<, #value

Constructor Details

#initializeSQLString

Returns a new instance of SQLString.


8
9
10
11
# File 'activerecord/lib/arel/collectors/sql_string.rb', line 8

def initialize(*)
  super
  @bind_index = 1
end

Instance Method Details

#add_bind(bind) ⇒ Object


13
14
15
16
17
# File 'activerecord/lib/arel/collectors/sql_string.rb', line 13

def add_bind(bind)
  self << yield(@bind_index)
  @bind_index += 1
  self
end