Sha256: c13f9610a27fb897521b74d7a44421933b46683a4f5d52e3e40bea9a7f5b512f

Contents?: true

Size: 470 Bytes

Versions: 4

Compression:

Stored size: 470 Bytes

Contents

module Percheron
  module Actions
    class Restart

      include Base

      def initialize(container)
        @container = container
      end

      def execute!
        stop!
        start!
        container
      end

      private

        attr_reader :container

        def stop!
          Stop.new(container).execute!
        end

        def start!
          Start.new(container, container.dependant_containers.values).execute!
        end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
percheron-0.6.3 lib/percheron/actions/restart.rb
percheron-0.6.2 lib/percheron/actions/restart.rb
percheron-0.6.1 lib/percheron/actions/restart.rb
percheron-0.6.0 lib/percheron/actions/restart.rb