Class: Arel::Collectors::SubstituteBinds

Inherits:
Object
  • Object
show all
Defined in:
lib/arel/collectors/substitute_binds.rb

Instance Method Summary collapse

Constructor Details

#initialize(quoter, delegate_collector) ⇒ SubstituteBinds

Returns a new instance of SubstituteBinds.



6
7
8
9
# File 'lib/arel/collectors/substitute_binds.rb', line 6

def initialize(quoter, delegate_collector)
  @quoter = quoter
  @delegate = delegate_collector
end

Instance Method Details

#<<(str) ⇒ Object



11
12
13
14
# File 'lib/arel/collectors/substitute_binds.rb', line 11

def <<(str)
  delegate << str
  self
end

#add_bind(bind) ⇒ Object



16
17
18
# File 'lib/arel/collectors/substitute_binds.rb', line 16

def add_bind(bind)
  self << quoter.quote(bind)
end

#valueObject



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

def value
  delegate.value
end