Skip to content

Add Settings#replace to support wholesale replacement of settings in a configurable object #109

Description

@timriley

This would better support the use case in dry-rb/dry-system#162 (see dry-rb/dry-system#162 (comment) for specific notes), in which all the settings from one class are "imported" into another for use there too.

Currently, this is done like so:

AnotherConfigurableThing._settings.each do |setting|
  _settings << setting.dup
end

But it would be nicer to do it like this:

_settings.replace(AnotherConfigurableThing._settings.dup)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions