class ConnectionPool::Wrapper
Constants
- METHODS
Public Class Methods
Source
# File lib/connection_pool/wrapper.rb, line 5 def initialize(options = {}, &block) @pool = options.fetch(:pool) { ::ConnectionPool.new(options, &block) } end
Public Instance Methods
Source
# File lib/connection_pool/wrapper.rb, line 36 def method_missing(name, *args, **kwargs, &block) with do |connection| connection.send(name, *args, **kwargs, &block) end end
Source
# File lib/connection_pool/wrapper.rb, line 25 def pool_available @pool.available end
Source
# File lib/connection_pool/wrapper.rb, line 17 def pool_shutdown(&block) @pool.shutdown(&block) end
Source
# File lib/connection_pool/wrapper.rb, line 29 def respond_to?(id, *args) METHODS.include?(id) || with { |c| c.respond_to?(id, *args) } end
Source
# File lib/connection_pool/wrapper.rb, line 13 def with(&block) @pool.with(&block) end