Sha256: da90835dac5961798e0edb86b2474d347d19c655b08b52e743bef3ccf56a707f

Contents?: true

Size: 829 Bytes

Versions: 56

Compression:

Stored size: 829 Bytes

Contents

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

  Contract Symbol => Maybe[KuberKit::Core::EnvFiles::AbstractEnvFile]
  def get(env_file_name)
    env_file = get_from_configuration(env_file_name) || 
               get_global(env_file_name)

    env_file
  end

  Contract Symbol => Maybe[KuberKit::Core::EnvFiles::AbstractEnvFile]
  def get_global(env_file_name)
    store.get(env_file_name)
  end

  Contract Symbol => Maybe[KuberKit::Core::EnvFiles::AbstractEnvFile]
  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

56 entries across 56 versions & 1 rubygems

Version Path
kuber_kit-1.2.1 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.0 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.1 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.0.1 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.0.0 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.9 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.8 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.7 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.6 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.5 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.4 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.3 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.2 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.1 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.9.0 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.8.8 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.8.7 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.8.6 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.8.5 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-0.8.4 lib/kuber_kit/core/env_files/env_file_store.rb