Class: ActiveRecord::Turntable::PoolProxy
- Inherits:
-
Object
- Object
- ActiveRecord::Turntable::PoolProxy
- Defined in:
- lib/active_record/turntable/pool_proxy.rb
Instance Method Summary collapse
-
#initialize(proxy) ⇒ PoolProxy
constructor
A new instance of PoolProxy.
- #proxy ⇒ Object (also: #connection)
- #with_connection {|proxy| ... } ⇒ Object
Constructor Details
#initialize(proxy) ⇒ PoolProxy
Returns a new instance of PoolProxy.
13 14 15 |
# File 'lib/active_record/turntable/pool_proxy.rb', line 13 def initialize(proxy) @proxy = proxy end |
Instance Method Details
#proxy ⇒ Object Also known as: connection
17 18 19 |
# File 'lib/active_record/turntable/pool_proxy.rb', line 17 def proxy @proxy end |
#with_connection {|proxy| ... } ⇒ Object
22 23 24 |
# File 'lib/active_record/turntable/pool_proxy.rb', line 22 def with_connection yield proxy end |