Sha256: 52cc45b9806b7f65ceb858270baa1ac2663f90aecaa96007ed07ce3645383399

Contents?: true

Size: 494 Bytes

Versions: 8

Compression:

Stored size: 494 Bytes

Contents

module Percheron
  module Actions
    class Stop

      include Base

      def initialize(container)
        @container = container
      end

      def execute!
        results = []
        results << stop! if container.running?
        results.compact.empty? ? nil : 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

8 entries across 8 versions & 1 rubygems

Version Path
percheron-0.7.6 lib/percheron/actions/stop.rb
percheron-0.7.5 lib/percheron/actions/stop.rb
percheron-0.7.4 lib/percheron/actions/stop.rb
percheron-0.7.3 lib/percheron/actions/stop.rb
percheron-0.7.2 lib/percheron/actions/stop.rb
percheron-0.7.1 lib/percheron/actions/stop.rb
percheron-0.7.0 lib/percheron/actions/stop.rb
percheron-0.6.4 lib/percheron/actions/stop.rb