Sha256: 164c2a24153a07517236c4e945b2334c45d70e10bb70f91839663678d97127b7

Contents?: true

Size: 479 Bytes

Versions: 4

Compression:

Stored size: 479 Bytes

Contents

module Percheron
  module Container
    module Actions
      class Stop

        def initialize(container)
          @container = container
        end

        def execute!
          if container.running?
            $logger.debug "Stopping '#{container.name}'"
            container.docker_container.stop!
          else
            raise Errors::ContainerNotRunning.new
          end
        end

        private

          attr_reader :container

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
percheron-0.2.3 lib/percheron/container/actions/stop.rb
percheron-0.2.2 lib/percheron/container/actions/stop.rb
percheron-0.2.1 lib/percheron/container/actions/stop.rb
percheron-0.2.0 lib/percheron/container/actions/stop.rb