Class: Dionysus::Consumer::WorkersGroup
- Inherits:
-
Object
- Object
- Dionysus::Consumer::WorkersGroup
- Defined in:
- lib/dionysus/consumer/workers_group.rb
Instance Method Summary collapse
- #<<(worker) ⇒ Object
-
#initialize ⇒ WorkersGroup
constructor
A new instance of WorkersGroup.
- #work ⇒ Object
Constructor Details
#initialize ⇒ WorkersGroup
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 |
#work ⇒ Object
15 16 17 |
# File 'lib/dionysus/consumer/workers_group.rb', line 15 def work workers.map(&:join) end |