Class: ActiveRecord::Originator::CollectorProxy
- Inherits:
-
Object
- Object
- ActiveRecord::Originator::CollectorProxy
- Defined in:
- lib/activerecord/originator/collector_proxy.rb
Overview
This class is a proxy to deduplicate the originator comment.
Instance Attribute Summary collapse
-
#last_str ⇒ Object
readonly
Returns the value of attribute last_str.
-
#preparable ⇒ Object
Returns the value of attribute preparable.
Instance Method Summary collapse
- #<<(str) ⇒ Object
- #add_bind ⇒ Object
- #add_binds ⇒ Object
-
#initialize(collector) ⇒ CollectorProxy
constructor
A new instance of CollectorProxy.
- #retryable ⇒ Object
- #retryable=(v) ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(collector) ⇒ CollectorProxy
Returns a new instance of CollectorProxy.
9 10 11 12 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 9 def initialize(collector) @collector = collector @last_str = nil end |
Instance Attribute Details
#last_str ⇒ Object (readonly)
Returns the value of attribute last_str.
14 15 16 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 14 def last_str @last_str end |
#preparable ⇒ Object
Returns the value of attribute preparable.
7 8 9 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 7 def preparable @preparable end |
Instance Method Details
#<<(str) ⇒ Object
16 17 18 19 20 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 16 def <<(str) @collector << str @last_str = str self end |
#add_bind ⇒ Object
22 23 24 25 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 22 def add_bind(...) @collector.add_bind(...) self end |
#add_binds ⇒ Object
27 28 29 30 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 27 def add_binds(...) @collector.add_binds(...) self end |
#retryable ⇒ Object
36 37 38 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 36 def retryable @collector.retryable end |
#retryable=(v) ⇒ Object
40 41 42 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 40 def retryable=(v) @collector.retryable = v end |
#value ⇒ Object
32 33 34 |
# File 'lib/activerecord/originator/collector_proxy.rb', line 32 def value @collector.value end |