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.



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

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

Instance Method Details

#<<(str) ⇒ Object



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

def << str
  delegate << str
  self
end

#add_bind(bind) ⇒ Object



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

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

#valueObject



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

def value
  delegate.value
end