Class: Kuby::Docker::Packages::Package
- Inherits:
-
Object
- Object
- Kuby::Docker::Packages::Package
- Defined in:
- lib/kuby/docker/packages/package.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(Symbol) }.
-
#version ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(T.nilable(String)) }.
Instance Method Summary collapse
-
#initialize(name, version = nil) ⇒ Package
constructor
T::Sig::WithoutRuntime.sig { params(name: Symbol, version: T.nilable(String)).void }.
-
#managed? ⇒ Boolean
T::Sig::WithoutRuntime.sig { returns(T::Boolean) }.
-
#with_version(ver) ⇒ Object
T::Sig::WithoutRuntime.sig { params(ver: String).returns(T.self_type) }.
Constructor Details
#initialize(name, version = nil) ⇒ Package
T::Sig::WithoutRuntime.sig { params(name: Symbol, version: T.nilable(String)).void }
19 20 21 22 |
# File 'lib/kuby/docker/packages/package.rb', line 19 def initialize(name, version = nil) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(Symbol) }
13 14 15 |
# File 'lib/kuby/docker/packages/package.rb', line 13 def name @name end |
#version ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(T.nilable(String)) }
16 17 18 |
# File 'lib/kuby/docker/packages/package.rb', line 16 def version @version end |
Instance Method Details
#managed? ⇒ Boolean
T::Sig::WithoutRuntime.sig { returns(T::Boolean) }
30 31 32 |
# File 'lib/kuby/docker/packages/package.rb', line 30 def managed? false end |
#with_version(ver) ⇒ Object
T::Sig::WithoutRuntime.sig { params(ver: String).returns(T.self_type) }
25 26 27 |
# File 'lib/kuby/docker/packages/package.rb', line 25 def with_version(ver) self.class.new(name, ver) end |