Sha256: 14512a09cee6805b8922221bd31b334a6956151bf1705e18267bc714a855bf42
Contents?: true
Size: 552 Bytes
Versions: 10
Compression:
Stored size: 552 Bytes
Contents
module Percheron module Actions class Restart include Base def initialize(unit) @unit = unit end def execute! results = [] results << stop! results << start! results.compact.empty? ? nil : unit end private attr_reader :unit def stop! Stop.new(unit).execute! end def start! opts = { dependant_units: unit.startable_dependant_units.values } Start.new(unit, opts).execute! end end end end
Version data entries
10 entries across 10 versions & 1 rubygems