Method: Tpool#initialize

Defined in:
lib/tpool.rb

#initialize(args) ⇒ Tpool



20
21
22
23
24
25
26
27
28
# File 'lib/tpool.rb', line 20

def initialize(args)
  @args = args
  @args.each do |key, val|
    raise "Invalid argument given: '#{key}'." if Tpool::ARGS_VALID.index(key) == nil
  end
  
  @queue = Queue.new
  self.start
end