Class: Dionysus::Consumer::WorkersGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/consumer/workers_group.rb

Instance Method Summary collapse

Constructor Details

#initializeWorkersGroup

Returns a new instance of WorkersGroup.



7
8
9
# File 'lib/dionysus/consumer/workers_group.rb', line 7

def initialize
  @workers = []
end

Instance Method Details

#<<(worker) ⇒ Object



11
12
13
# File 'lib/dionysus/consumer/workers_group.rb', line 11

def <<(worker)
  workers << worker
end

#workObject



15
16
17
# File 'lib/dionysus/consumer/workers_group.rb', line 15

def work
  workers.map(&:join)
end