class ConnectionPool::Wrapper
Constants
- METHODS
Public Class Methods
new(**options, &)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 5 def initialize(**options, &) @pool = options.fetch(:pool) { ::ConnectionPool.new(**options, &) } end
Public Instance Methods
method_missing(name, *, **, &)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 37 def method_missing(name, *, **, &) with do |connection| connection.send(name, *, **, &) end end
pool_available()
click to toggle source
# File lib/connection_pool/wrapper.rb, line 25 def pool_available @pool.available end
pool_shutdown(&)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 17 def pool_shutdown(&) @pool.shutdown(&) end
pool_size()
click to toggle source
# File lib/connection_pool/wrapper.rb, line 21 def pool_size @pool.size end
respond_to?(id, *, **)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 29 def respond_to?(id, *, **) METHODS.include?(id) || with { |c| c.respond_to?(id, *, **) } end
respond_to_missing?(id, *, **)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 33 def respond_to_missing?(id, *, **) with { |c| c.respond_to?(id, *, **) } end
with(**, &)
click to toggle source
# File lib/connection_pool/wrapper.rb, line 13 def with(**, &) @pool.with(**, &) end
wrapped_pool()
click to toggle source
# File lib/connection_pool/wrapper.rb, line 9 def wrapped_pool @pool end