Method: Object#pool

Defined in:
lib/core/object.rb

#pool(name, &block) ⇒ Object

The pool method creates a pool and inserts it into the pool hash



5
6
7
8
9
10
11
# File 'lib/core/object.rb', line 5

def pool(name, &block)
  if block
    pools[name.to_s] ||= PoolParty::Pool.new(name, &block)
  else
    raise PoolParty::PoolPartyError.create("PoolError", "You must pass a block when defining a pool")
  end
end