class Dry::Configurable::Setting

@api public
A defined setting.

def self.mutable_value?(value)

Other tags:
    Api: - private
def self.mutable_value?(value)
  MUTABLE_VALUE_TYPES.any? { |type| value.is_a?(type) }
end

def initialize(

Other tags:
    Api: - private
def initialize(
  name,
  default:,
  constructor: DEFAULT_CONSTRUCTOR,
  children: EMPTY_ARRAY,
  **options
)
  @name = name
  @default = default
  @mutable = children.any? || options.fetch(:mutable) {
    # Allow `cloneable` as an option alias for `mutable`
    options.fetch(:cloneable) { Setting.mutable_value?(default) }
  }
  @constructor = constructor
  @children = children
  @options = options
end

def mutable?

Other tags:
    Api: - public
def mutable?
  mutable
end

def reader?

Other tags:
    Api: - private
def reader?
  options[:reader].equal?(true)
end

def to_value

Other tags:
    Api: - private
def to_value
  if children.any?
    (options[:config_class] || Config).new(children)
  else
    value = default
    value = constructor.(value) unless value.eql?(Undefined)
    mutable? ? value.dup : value
  end
end