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

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

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.

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.



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.



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.



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

def [](key)
  store[key]
end