Parent

ConnectionPool::Wrapper

Constants

METHODS

Public Class Methods

new(options = {}, &block) click to toggle source
# File lib/connection_pool.rb, line 97
def initialize(options = {}, &block)
  @pool = ::ConnectionPool.new(options, &block)
end

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/connection_pool.rb, line 118
def method_missing(name, *args, &block)
  @pool.with do |connection|
    connection.send(name, *args, &block)
  end
end
pool_shutdown(&block) click to toggle source
# File lib/connection_pool.rb, line 110
def pool_shutdown(&block)
  @pool.shutdown(&block)
end
respond_to?(id, *args) click to toggle source
# File lib/connection_pool.rb, line 114
def respond_to?(id, *args)
  METHODS.include?(id) || @pool.with { |c| c.respond_to?(id, *args) }
end
with() click to toggle source
# File lib/connection_pool.rb, line 101
def with
  conn = @pool.checkout
  begin
    yield conn
  ensure
    @pool.checkin
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.