Class: KuberKit::Core::Artifacts::ArtifactStore

Inherits:
Object
  • Object
show all
Defined in:
lib/kuber_kit/core/artifacts/artifact_store.rb

Instance Method Summary collapse

Instance Method Details

#add(artifact) ⇒ Object



2
3
4
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 2

def add(artifact)
  store.add(artifact.name, artifact)
end

#exists?(artifact_name) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 26

def exists?(artifact_name)
  store.exists?(artifact_name)
end

#get(artifact_name) ⇒ Object



6
7
8
9
10
11
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 6

def get(artifact_name)
  artifact = get_from_configuration(artifact_name) || 
             get_global(artifact_name)

  artifact
end

#get_from_configuration(artifact_name) ⇒ Object



17
18
19
20
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 17

def get_from_configuration(artifact_name)
  artifacts = KuberKit.current_configuration.artifacts
  artifacts[artifact_name]
end

#get_global(artifact_name) ⇒ Object



13
14
15
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 13

def get_global(artifact_name)
  store.get(artifact_name)
end

#reset!Object



22
23
24
# File 'lib/kuber_kit/core/artifacts/artifact_store.rb', line 22

def reset!
  store.reset!
end