Module: Slaver::ProxyMethods::ClassMethods
- Defined in:
- lib/slaver/proxy_methods.rb
Instance Method Summary collapse
- #clear_active_connections_with_proxy! ⇒ Object
- #clear_all_connections_with_proxy! ⇒ Object
- #connected_with_proxy? ⇒ Boolean
- #connection_pool_with_proxy ⇒ Object
- #connection_proxy ⇒ Object
- #connection_with_proxy ⇒ Object
Instance Method Details
#clear_active_connections_with_proxy! ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/slaver/proxy_methods.rb', line 32 def clear_active_connections_with_proxy! if current_config connection_proxy.clear_active_connections! else clear_active_connections_without_proxy! end end |
#clear_all_connections_with_proxy! ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/slaver/proxy_methods.rb', line 40 def clear_all_connections_with_proxy! if current_config connection_proxy.clear_all_connections! else clear_all_connections_without_proxy! end end |
#connected_with_proxy? ⇒ Boolean
48 49 50 51 52 53 54 |
# File 'lib/slaver/proxy_methods.rb', line 48 def connected_with_proxy? if current_config connection_proxy.connected? else connected_without_proxy? end end |
#connection_pool_with_proxy ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/slaver/proxy_methods.rb', line 16 def connection_pool_with_proxy if current_config connection_proxy.connection_pool else connection_pool_without_proxy end end |
#connection_proxy ⇒ Object
56 57 58 |
# File 'lib/slaver/proxy_methods.rb', line 56 def connection_proxy Proxy.instance.for_config(self, current_config) end |
#connection_with_proxy ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/slaver/proxy_methods.rb', line 24 def connection_with_proxy if current_config connection_proxy else (connection_pool && connection_pool.connection) end end |