Class: Runnerbean::ProcessGroup
- Inherits:
-
Object
- Object
- Runnerbean::ProcessGroup
- Defined in:
- lib/runnerbean/process_group.rb
Instance Attribute Summary collapse
- #name ⇒ Object
-
#processes ⇒ Object
readonly
Returns the value of attribute processes.
Instance Method Summary collapse
- #ensure_started! ⇒ Object
-
#initialize(*processes) ⇒ ProcessGroup
constructor
A new instance of ProcessGroup.
- #kill! ⇒ Object
- #start! ⇒ Object
Constructor Details
#initialize(*processes) ⇒ ProcessGroup
Returns a new instance of ProcessGroup.
6 7 8 |
# File 'lib/runnerbean/process_group.rb', line 6 def initialize(*processes) @processes = processes end |
Instance Attribute Details
#name ⇒ Object
18 19 20 |
# File 'lib/runnerbean/process_group.rb', line 18 def name @name ||= default_process_group_name end |
#processes ⇒ Object (readonly)
Returns the value of attribute processes.
3 4 5 |
# File 'lib/runnerbean/process_group.rb', line 3 def processes @processes end |
Instance Method Details
#ensure_started! ⇒ Object
22 23 24 25 |
# File 'lib/runnerbean/process_group.rb', line 22 def ensure_started! kill_if_running! start! end |
#kill! ⇒ Object
10 11 12 |
# File 'lib/runnerbean/process_group.rb', line 10 def kill! generic_command(:kill) end |
#start! ⇒ Object
14 15 16 |
# File 'lib/runnerbean/process_group.rb', line 14 def start! generic_command(:start) end |