Class: KuberKit::Core::ContextHelper::ImageHelper

Inherits:
BaseHelper show all
Defined in:
lib/kuber_kit/core/context_helper/image_helper.rb

Instance Attribute Summary

Attributes inherited from BaseHelper

#artifact_store, #env_file_reader, #image_store, #shell

Instance Method Summary collapse

Methods inherited from BaseHelper

#artifact_path, #configuration_name, #env_file, #global_build_args, #global_build_vars, #image_url

Methods inherited from AbstractHelper

#get_binding

Constructor Details

#initialize(image_store:, artifact_store:, shell:, env_file_reader:, image:) ⇒ ImageHelper

Returns a new instance of ImageHelper.



2
3
4
5
6
7
8
9
10
# File 'lib/kuber_kit/core/context_helper/image_helper.rb', line 2

def initialize(image_store:, artifact_store:, shell:, env_file_reader:, image:)
  super(
    image_store:      image_store, 
    artifact_store:   artifact_store, 
    shell:            shell,
    env_file_reader:  env_file_reader
  )
  @image = image
end

Instance Method Details

#build_varsObject



16
17
18
# File 'lib/kuber_kit/core/context_helper/image_helper.rb', line 16

def build_vars
  KuberKit::Core::ContextHelper::ContextVars.new(@image.build_vars)
end

#image_nameObject



12
13
14
# File 'lib/kuber_kit/core/context_helper/image_helper.rb', line 12

def image_name
  @image.name.to_s
end