lib/.rbnext/3.1/anyway/config.rb in anyway_config-2.5.4 vs lib/.rbnext/3.1/anyway/config.rb in anyway_config-2.6.0

- old
+ new

@@ -152,11 +152,11 @@ raise ArgumentError, "Either methods or block should be specified, not both" if block && !names.empty? if block load_callbacks << BlockCallback.new(block) else - load_callbacks.push(*names.map { NamedCallback.new(_1) }) + load_callbacks.push(*names.map { it = _1;NamedCallback.new(it) }) end end def load_callbacks return @load_callbacks if instance_variable_defined?(:@load_callbacks) @@ -378,26 +378,26 @@ # Trace may contain unknown attributes trace&.keep_if { |key| self.class.config_attributes.include?(key.to_sym) } # Run on_load callbacks - self.class.load_callbacks.each { _1.apply_to(self) } + self.class.load_callbacks.each { it = _1;it.apply_to(self) } # Set trace after we write all the values to # avoid changing the source to accessor @__trace__ = trace self end - def load_from_sources(base_config, **options) + def load_from_sources(base_config, **__kwrest__) Anyway.loaders.each do |(_id, loader)| - Utils.deep_merge!(base_config, loader.call(**options)) + Utils.deep_merge!(base_config, loader.call(**__kwrest__)) end base_config end - def dig(*keys) = values.dig(*keys) + def dig(*__rest__) ; values.dig(*__rest__); end def to_h() = values.deep_dup.deep_freeze def dup self.class.allocate.tap do |new_config|