Class: Apnotic::ConnectionPool

Inherits:
Object
  • Object
show all
Defined in:
lib/apnotic/connection_pool.rb

Class Method Summary collapse

Class Method Details

.development(options = {}, pool_options = {}) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/apnotic/connection_pool.rb', line 16

def development(options={}, pool_options={})
  ::ConnectionPool.new(pool_options) do
    connection = Apnotic::Connection.development(options)
    yield(connection)
    connection
  end
end

.new(options = {}, pool_options = {}) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/apnotic/connection_pool.rb', line 8

def new(options={}, pool_options={})
  ::ConnectionPool.new(pool_options) do
    connection = Apnotic::Connection.new(options)
    yield(connection)
    connection
  end
end