Sha256: e33e5738d96279d665dd722d93719eb83a657842105d98bd038c00b523588c6d

Contents?: true

Size: 692 Bytes

Versions: 39

Compression:

Stored size: 692 Bytes

Contents

class KuberKit::Core::Artifacts::ArtifactStore
  def add(artifact)
    store.add(artifact.name, artifact)
  end

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

    artifact
  end

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

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

  def reset!
    store.reset!
  end

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

  private
    def store
      @@store ||= KuberKit::Core::Store.new(KuberKit::Core::Artifacts::AbstractArtifact)
    end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
kuber_kit-0.5.5 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.5.4 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.5.3 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.5.2 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.5.1 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.5.0 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.9 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.8 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.7 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.6 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.5 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.4 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.3 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.2 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.1 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.4.0 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.3.11 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.3.10 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.3.9 lib/kuber_kit/core/artifacts/artifact_store.rb
kuber_kit-0.3.8 lib/kuber_kit/core/artifacts/artifact_store.rb