lib/dry/system/provider_sources/settings.rb in dry-system-0.27.2 vs lib/dry/system/provider_sources/settings.rb in dry-system-1.0.0.rc1
- old
+ new
@@ -19,10 +19,10 @@
# Save the block and evaluate it lazily to allow a provider with this source
# to `require` any necessary files for the block to evaluate correctly (e.g.
# requiring an app-specific types module for setting constructors)
if block
@settings_block = block
- elsif @settings_class
+ elsif defined? @settings_class
@settings_class
elsif @settings_block
@settings_class = Class.new(Settings::Config, &@settings_block)
end
end