Module: Pools::Pooled::ClassMethods
- Defined in:
- lib/pools/pooled.rb
Instance Method Summary collapse
Instance Method Details
#connection_methods(*methods) ⇒ Object
33 34 35 36 37 38 39 40 41 |
# File 'lib/pools/pooled.rb', line 33 def connection_methods(*methods) methods.each do |method| define_method(method) do |*params, &block| with_connection do |client| client.send(method, *params, &block) end end end end |
#preparation_methods(*methods) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/pools/pooled.rb', line 43 def preparation_methods(*methods) methods.each do |method| define_method(method) do |*params| @preparation_chain << ([method] + params) end end end |