1
0
Fork 0
mirror of https://github.com/mperham/connection_pool synced 2023-03-27 23:22:21 -04:00

Merge pull request #25 from JustinLove/add_wrapper_respond_to_functionality

Added respond_to? extension to wrapper class
This commit is contained in:
Mike Perham 2012-12-17 10:15:31 -08:00
commit 4337794da3

View file

@ -87,6 +87,12 @@ class ConnectionPool
end
alias_method :with_connection, :with
def respond_to?(method_symbol, include_private=false)
@pool.with do |connection|
(connection.methods + self.methods).uniq.include?(method_symbol)
end
end
def method_missing(name, *args, &block)
@pool.with do |connection|
connection.send(name, *args, &block)