Class: Arel::Collectors::SQLString

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

Instance Method Summary collapse

Methods inherited from PlainString

#<<, #value

Constructor Details

#initializeSQLString

Returns a new instance of SQLString.



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

def initialize(*)
  super
  @bind_index = 1
end

Instance Method Details

#add_bind(bind) ⇒ Object



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

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

#compile(bvs) ⇒ Object



20
21
22
# File 'lib/arel/collectors/sql_string.rb', line 20

def compile bvs
  value
end