Class: KuberKit::Core::ContextHelper::ServiceHelper

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

Instance Attribute Summary

Attributes inherited from BaseHelper

#artifact_store, #image_store, #shell

Instance Method Summary collapse

Methods inherited from BaseHelper

#artifact_path, #configuration_name, #get_binding, #image_url

Constructor Details

#initialize(image_store:, artifact_store:, shell:, service:) ⇒ ServiceHelper

Returns a new instance of ServiceHelper.



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

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

Instance Method Details

#service_nameObject



11
12
13
# File 'lib/kuber_kit/core/context_helper/service_helper.rb', line 11

def service_name
  @service.name.to_s
end

#service_uriObject



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

def service_uri
  service_name
    .sub("_", "-")
end