Class: DaemonicThreads::Daemons
- Inherits:
-
Object
- Object
- DaemonicThreads::Daemons
- Defined in:
- lib/ruby-daemonic-threads/daemons.rb
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(process) ⇒ Daemons
constructor
A new instance of Daemons.
- #join ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(process) ⇒ Daemons
Returns a new instance of Daemons.
19 20 21 22 23 24 25 |
# File 'lib/ruby-daemonic-threads/daemons.rb', line 19 def initialize(process) @daemons = {} process.config.daemons.each do |name, config| @daemons[name] = DaemonicThreads::Runner.new(name, config, process) end end |
Instance Method Details
#[](name) ⇒ Object
27 28 29 |
# File 'lib/ruby-daemonic-threads/daemons.rb', line 27 def [] name @daemons[name] end |
#join ⇒ Object
35 36 37 |
# File 'lib/ruby-daemonic-threads/daemons.rb', line 35 def join each_daemon :join end |
#start ⇒ Object
31 32 33 |
# File 'lib/ruby-daemonic-threads/daemons.rb', line 31 def start each_daemon :start end |
#stop ⇒ Object
39 40 41 |
# File 'lib/ruby-daemonic-threads/daemons.rb', line 39 def stop each_daemon :stop end |