Class: Bundler::ConnectionPool::Wrapper
Relationships & Source Files | |
Inherits: | BasicObject |
Defined in: | lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb |
Constant Summary
Class Method Summary
- .new(options = {}, &block) ⇒ Wrapper constructor
Instance Method Summary
-
#method_missing(name, *args, &block)
See additional method definition at line 35.
- #pool_available
- #pool_shutdown(&block)
- #pool_size
- #respond_to?(id, *args) ⇒ Boolean
- #with(&block)
- #wrapped_pool
Constructor Details
.new(options = {}, &block) ⇒ Wrapper
# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 5
def initialize( = {}, &block) @pool = .fetch(:pool) { ::Bundler::ConnectionPool.new(, &block) } end
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block)
See additional method definition at line 35.
# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 47
def method_missing(name, *args, **kwargs, &block) with do |connection| connection.send(name, *args, **kwargs, &block) end end
Instance Method Details
#pool_available
[ GitHub ]# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 25
def pool_available @pool.available end
#pool_shutdown(&block)
[ GitHub ]# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 17
def pool_shutdown(&block) @pool.shutdown(&block) end
#pool_size
[ GitHub ]# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 21
def pool_size @pool.size end
#respond_to?(id, *args) ⇒ Boolean
#with(&block)
[ GitHub ]# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 13
def with(&block) @pool.with(&block) end
#wrapped_pool
[ GitHub ]# File 'lib/bundler/vendor/connection_pool/lib/connection_pool/wrapper.rb', line 9
def wrapped_pool @pool end