Class: Arel::Collectors::Bind

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

Instance Method Summary collapse

Constructor Details

#initializeBind

Returns a new instance of Bind.



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

def initialize
  @binds = []
end

Instance Method Details

#<<(str) ⇒ Object



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

def <<(str)
  self
end

#add_bind(bind) ⇒ Object



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

def add_bind(bind)
  @binds << bind
  self
end

#add_binds(binds, proc_for_binds = nil) ⇒ Object



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

def add_binds(binds, proc_for_binds = nil)
  @binds.concat proc_for_binds ? binds.map(&proc_for_binds) : binds
  self
end

#valueObject



24
25
26
# File 'lib/arel/collectors/bind.rb', line 24

def value
  @binds
end