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.3.8 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.7 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.8 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.6 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.7 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.5 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.4 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.6 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.3 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.2 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.5 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.1 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.3.0 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.4 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.7 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.6 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.5 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.4 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.2.2 lib/kuber_kit/core/env_files/env_file_store.rb
kuber_kit-1.1.2 lib/kuber_kit/core/env_files/env_file_store.rb