Class: Dry::System::ProviderSources::Settings::Loader Private

Inherits:
Object
  • Object
show all
Defined in:
lib/dry/system/provider_sources/settings/loader.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

API:

  • private

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root:, env:, store: ENV) ⇒ Loader

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Loader.

API:

  • private



13
14
15
16
# File 'lib/dry/system/provider_sources/settings/loader.rb', line 13

def initialize(root:, env:, store: ENV)
  @store = store
  load_dotenv(root, env.to_sym)
end

Instance Attribute Details

#storeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



10
11
12
# File 'lib/dry/system/provider_sources/settings/loader.rb', line 10

def store
  @store
end

Instance Method Details

#[](key) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



19
20
21
# File 'lib/dry/system/provider_sources/settings/loader.rb', line 19

def [](key)
  store[key]
end