Sha256: d50e48b02ace68b52daf50daecf6958b8b22b58333bcd22a38b20682023da26f

Contents?: true

Size: 431 Bytes

Versions: 4

Compression:

Stored size: 431 Bytes

Contents

module Percheron
  module Actions
    class Stop

      include Base

      def initialize(container)
        @container = container
      end

      def execute!
        stop! if container.running?
        container
      end

      private

        attr_reader :container

        def stop!
          $logger.info "Stopping '#{container.name}' container"
          container.docker_container.stop!
        end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

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