Class: Kuby::Docker::InlineLayer

Inherits:
Layer
  • Object
show all
Defined in:
lib/kuby/docker/inline_layer.rb

Instance Attribute Summary collapse

Attributes inherited from Layer

#environment

Instance Method Summary collapse

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

#blockObject (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