Class: Arel::Collectors::Bind
- Defined in:
- activerecord/lib/arel/collectors/bind.rb
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind(bind) ⇒ Object
- #add_binds(binds, proc_for_binds = nil) ⇒ Object
-
#initialize ⇒ Bind
constructor
A new instance of Bind.
- #value ⇒ Object
Constructor Details
#initialize ⇒ Bind
Returns a new instance of Bind.
6 7 8 |
# File 'activerecord/lib/arel/collectors/bind.rb', line 6 def initialize @binds = [] end |
Instance Method Details
#<<(str) ⇒ Object
10 11 12 |
# File 'activerecord/lib/arel/collectors/bind.rb', line 10 def <<(str) self end |
#add_bind(bind) ⇒ Object
14 15 16 17 |
# File 'activerecord/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 'activerecord/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 |
#value ⇒ Object
24 25 26 |
# File 'activerecord/lib/arel/collectors/bind.rb', line 24 def value @binds end |