Class: Async::Container::Controller
- Inherits:
-
Object
- Object
- Async::Container::Controller
- Defined in:
- lib/async/container/controller.rb
Instance Method Summary collapse
- #<<(container) ⇒ Object
-
#initialize ⇒ Controller
constructor
A new instance of Controller.
- #stop ⇒ Object
- #wait ⇒ Object
Constructor Details
#initialize ⇒ Controller
Returns a new instance of Controller.
26 27 28 |
# File 'lib/async/container/controller.rb', line 26 def initialize @containers = [] end |
Instance Method Details
#<<(container) ⇒ Object
30 31 32 |
# File 'lib/async/container/controller.rb', line 30 def << container @containers << container end |
#stop ⇒ Object
38 39 40 |
# File 'lib/async/container/controller.rb', line 38 def stop @containers.each(&:stop) end |
#wait ⇒ Object
34 35 36 |
# File 'lib/async/container/controller.rb', line 34 def wait @containers.each(&:wait) end |