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:
commit
4337794da3
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue