Class: Apnotic::ConnectionPool
- Inherits:
-
Object
- Object
- Apnotic::ConnectionPool
- Defined in:
- lib/apnotic/connection_pool.rb
Class Method Summary collapse
- .development(options = {}, pool_options = {}) ⇒ Object
- .new(options = {}, pool_options = {}) ⇒ Object
Class Method Details
.development(options = {}, pool_options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/apnotic/connection_pool.rb', line 18 def development(={}, ={}) raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given? ::ConnectionPool.new() do connection = Apnotic::Connection.development() yield(connection) connection end end |
.new(options = {}, pool_options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/apnotic/connection_pool.rb', line 8 def new(={}, ={}) raise(LocalJumpError, "a block is needed when initializing an Apnotic::ConnectionPool") unless block_given? ::ConnectionPool.new() do connection = Apnotic::Connection.new() yield(connection) connection end end |