Class: Percheron::Actions::Restart
- Inherits:
-
Object
- Object
- Percheron::Actions::Restart
- Includes:
- Base
- Defined in:
- lib/percheron/actions/restart.rb
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(unit) ⇒ Restart
constructor
A new instance of Restart.
Methods included from Base
#base_dir, #in_working_directory
Constructor Details
#initialize(unit) ⇒ Restart
Returns a new instance of Restart.
6 7 8 |
# File 'lib/percheron/actions/restart.rb', line 6 def initialize(unit) @unit = unit end |
Instance Method Details
#execute! ⇒ Object
10 11 12 13 14 15 |
# File 'lib/percheron/actions/restart.rb', line 10 def execute! results = [] results << stop! results << start! results.compact.empty? ? nil : unit end |