Class: ActiveRecord::StatementCache::PartialQueryCollector
- Defined in:
- activerecord/lib/active_record/statement_cache.rb
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind(obj) ⇒ Object
-
#initialize ⇒ PartialQueryCollector
constructor
A new instance of PartialQueryCollector.
- #value ⇒ Object
Constructor Details
#initialize ⇒ PartialQueryCollector
Returns a new instance of PartialQueryCollector.
60 61 62 63 |
# File 'activerecord/lib/active_record/statement_cache.rb', line 60 def initialize @parts = [] @binds = [] end |
Instance Method Details
#<<(str) ⇒ Object
65 66 67 68 |
# File 'activerecord/lib/active_record/statement_cache.rb', line 65 def <<(str) @parts << str self end |
#add_bind(obj) ⇒ Object
70 71 72 73 74 |
# File 'activerecord/lib/active_record/statement_cache.rb', line 70 def add_bind(obj) @binds << obj @parts << Substitute.new self end |
#value ⇒ Object
76 77 78 |
# File 'activerecord/lib/active_record/statement_cache.rb', line 76 def value [@parts, @binds] end |