Sha256: f26e115a1367635c84a6f8ef32a753a9954ada899d7930c48e745275d726bc7a

Contents?: true

Size: 619 Bytes

Versions: 39

Compression:

Stored size: 619 Bytes

Contents

class KuberKit::Core::EnvFiles::EnvFileStore
  def add(env_file)
    store.add(env_file.name, env_file)
  end

  def get(env_file_name)
    env_file = get_from_configuration(env_file_name) || 
               get_global(env_file_name)

    env_file
  end

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

  def get_from_configuration(env_file_name)
    env_files = KuberKit.current_configuration.env_files
    env_files[env_file_name]
  end

  def reset!
    store.reset!
  end

  private
    def store
      @@store ||= KuberKit::Core::Store.new(KuberKit::Core::EnvFiles::AbstractEnvFile)
    end
end

Version data entries

39 entries across 39 versions & 1 rubygems

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