Class: KuberKit::Core::ContextHelper::BaseHelper
- Defined in:
- lib/kuber_kit/core/context_helper/base_helper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#artifact_store ⇒ Object
readonly
Returns the value of attribute artifact_store.
-
#image_store ⇒ Object
readonly
Returns the value of attribute image_store.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
- #artifact_path(name, file_name = nil) ⇒ Object
- #configuration_name ⇒ Object
- #get_binding ⇒ Object
- #image_url(image_name) ⇒ Object
-
#initialize(image_store:, artifact_store:, shell:) ⇒ BaseHelper
constructor
A new instance of BaseHelper.
Constructor Details
#initialize(image_store:, artifact_store:, shell:) ⇒ BaseHelper
Returns a new instance of BaseHelper.
4 5 6 7 8 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 4 def initialize(image_store:, artifact_store:, shell:) @image_store = image_store @artifact_store = artifact_store @shell = shell end |
Instance Attribute Details
#artifact_store ⇒ Object (readonly)
Returns the value of attribute artifact_store.
2 3 4 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 2 def artifact_store @artifact_store end |
#image_store ⇒ Object (readonly)
Returns the value of attribute image_store.
2 3 4 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 2 def image_store @image_store end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
2 3 4 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 2 def shell @shell end |
Instance Method Details
#artifact_path(name, file_name = nil) ⇒ Object
16 17 18 19 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 16 def artifact_path(name, file_name = nil) artifact = @artifact_store.get(name) [artifact.cloned_path, file_name].compact.join("/") end |
#configuration_name ⇒ Object
21 22 23 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 21 def configuration_name KuberKit.current_configuration.name end |
#get_binding ⇒ Object
25 26 27 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 25 def get_binding binding end |
#image_url(image_name) ⇒ Object
10 11 12 13 14 |
# File 'lib/kuber_kit/core/context_helper/base_helper.rb', line 10 def image_url(image_name) image = @image_store.get_image(image_name) image.remote_registry_url end |