lib/hanami/settings.rb in hanami-2.1.0 vs lib/hanami/settings.rb in hanami-2.2.0.beta1
- old
+ new
@@ -6,11 +6,11 @@
module Hanami
# Provides user-defined settings for an Hanami app or slice.
#
# Define your own settings by inheriting from this class in `config/settings.rb` within an app or
- # slice. Your settings will be loaded from matching ENV vars (with upper-cased names) and made
+ # slice. Your settings will be loaded from matching ENV vars (with upper-cased names) and be
# registered as a component as part of the Hanami app {Hanami::Slice::ClassMethods#prepare
# prepare} step.
#
# The settings instance is registered in your app and slice containers as a `"settings"`
# component. You can use the `Deps` mixin to inject this dependency and make settings available to
@@ -158,11 +158,11 @@
def initialize(store = EMPTY_STORE)
errors = config._settings.map(&:name).each_with_object({}) do |name, errs|
value = store.fetch(name, Undefined)
if value.eql?(Undefined)
- # When a key is missing entirely from the store, _read_ its value from the config instead,
- # which ensures its setting constructor runs (with a `nil` argument given) and raises any
+ # When a key is missing entirely from the store, _read_ its value from the config instead.
+ # This ensures its setting constructor runs (with a `nil` argument given) and raises any
# necessary errors.
public_send(name)
else
public_send("#{name}=", value)
end