Sha256: 7b8e74409410531cba10719339ab18a908ab42cb68ddb932c350fd40dad1cef4

Contents?: true

Size: 585 Bytes

Versions: 26

Compression:

Stored size: 585 Bytes

Contents

module Minke
  module Docker
    class Network
      def initialize network_name, shell_runner
        @network_name = network_name
        @shell_runner = shell_runner
      end

      def create
        @shell_runner.execute("docker network create #{@network_name}") if find_network.to_s == ''
      end

      def remove
        @shell_runner.execute("docker network rm #{@network_name}") unless find_network.to_s == ''
      end

      private 
      def find_network
        @shell_runner.execute_and_return("docker network ls | grep #{@network_name}")
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
minke-1.13.7 lib/minke/docker/network.rb
minke-1.13.6 lib/minke/docker/network.rb
minke-1.13.5 lib/minke/docker/network.rb
minke-1.13.4 lib/minke/docker/network.rb
minke-1.13.3 lib/minke/docker/network.rb
minke-1.13.2 lib/minke/docker/network.rb
minke-1.13.1 lib/minke/docker/network.rb
minke-1.13.0 lib/minke/docker/network.rb
minke-1.12.9 lib/minke/docker/network.rb
minke-1.12.8 lib/minke/docker/network.rb
minke-1.12.7 lib/minke/docker/network.rb
minke-1.12.5 lib/minke/docker/network.rb
minke-1.12.4 lib/minke/docker/network.rb
minke-1.12.3 lib/minke/docker/network.rb
minke-1.12.2 lib/minke/docker/network.rb
minke-1.12.0 lib/minke/docker/network.rb
minke-1.11.9 lib/minke/docker/network.rb
minke-1.11.8 lib/minke/docker/network.rb
minke-1.11.7 lib/minke/docker/network.rb
minke-1.11.6 lib/minke/docker/network.rb