Sha256: 9e91d78740cde54b36fbb0701e120cf107ff5dc11f7bd3b19c2a6004f2915c0e

Contents?: true

Size: 1.04 KB

Versions: 23

Compression:

Stored size: 1.04 KB

Contents

# typed: strict

module Kuby
  module Docker
    module Packages
      class ManagedPackage
        extend T::Sig

        sig { returns(Symbol) }
        attr_reader :name

        sig { returns(T::Hash[Symbol, String]) }
        attr_reader :names_per_distro

        sig {
          params(
            name: Symbol,
            names_per_distro: T::Hash[Symbol, String]
          )
          .void
        }
        def initialize(name, names_per_distro)
          @name = name
          @names_per_distro = names_per_distro
        end

        sig { params(distro: Symbol).returns(String) }
        def package_name_for(distro)
          names_per_distro.fetch(distro) do
            raise UnsupportedDistroError, "Couldn't install #{name} "\
              "because #{distro} is an unsupported distro"
          end
        end

        sig { params(ver: String).returns(T.self_type) }
        def with_version(ver)
          self
        end

        sig { returns(T::Boolean) }
        def managed?
          true
        end
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
kuby-core-0.17.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.16.1 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.16.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.15.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.14.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.13.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.12.0 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.16 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.15 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.14 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.13 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.12 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.11 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.10 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.9 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.8 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.7 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.6 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.4 lib/kuby/docker/packages/managed_package.rb
kuby-core-0.11.3 lib/kuby/docker/packages/managed_package.rb