Class: Kuby::Docker::InlineLayer
- Defined in:
- lib/kuby/docker/inline_layer.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
T::Sig::WithoutRuntime.sig { returns(T.proc.params(df: Dockerfile).void) }.
Attributes inherited from Layer
Instance Method Summary collapse
-
#apply_to(dockerfile) ⇒ Object
T::Sig::WithoutRuntime.sig { override.params(dockerfile: Dockerfile).void }.
-
#initialize(block) ⇒ InlineLayer
constructor
T::Sig::WithoutRuntime.sig { params(block: T.proc.params(df: Dockerfile).void).void }.
Constructor Details
#initialize(block) ⇒ InlineLayer
T::Sig::WithoutRuntime.sig { params(block: T.proc.params(df: Dockerfile).void).void }
12 13 14 |
# File 'lib/kuby/docker/inline_layer.rb', line 12 def initialize(block) @block = block end |
Instance Attribute Details
#block ⇒ Object (readonly)
T::Sig::WithoutRuntime.sig { returns(T.proc.params(df: Dockerfile).void) }
9 10 11 |
# File 'lib/kuby/docker/inline_layer.rb', line 9 def block @block end |
Instance Method Details
#apply_to(dockerfile) ⇒ Object
T::Sig::WithoutRuntime.sig { override.params(dockerfile: Dockerfile).void }
17 18 19 |
# File 'lib/kuby/docker/inline_layer.rb', line 17 def apply_to(dockerfile) block.call(dockerfile) end |