Sha256: 43f905e2b742e910ec1a840f2194378f4c2893d1e01eb9287b68daa93c707cac

Contents?: true

Size: 657 Bytes

Versions: 1

Compression:

Stored size: 657 Bytes

Contents

module Percheron
  module Container
    module Actions
      class Stop

        include Base

        def initialize(container)
          @container = container
        end

        def execute!
          stop!
        end

        private

          attr_reader :container

          def stop!
            if container.running?
              $logger.debug "Stopping '#{container.name}'"
              container.docker_container.stop!
            else
              $logger.debug "Not stopping '#{container.name}' container as it's not running"
              raise Errors::ContainerNotRunning.new
            end
          end

      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
percheron-0.5.0 lib/percheron/container/actions/stop.rb