class Percheron::Actions::Stop
Attributes
unit[R]
Public Class Methods
new(unit)
click to toggle source
# File lib/percheron/actions/stop.rb, line 6 def initialize(unit) @unit = unit end
Public Instance Methods
execute!()
click to toggle source
# File lib/percheron/actions/stop.rb, line 10 def execute! results = [] results << stop! if unit.running? results.compact.empty? ? nil : unit end
Private Instance Methods
stop!()
click to toggle source
# File lib/percheron/actions/stop.rb, line 20 def stop! $logger.info "Stopping '#{unit.display_name}' unit" unit.container.stop! end