class Dry::Configurable::Setting

@api private
This class represents a setting and is used internally.

def clonable_value?

Other tags:
    Api: - private
def clonable_value?
  CLONABLE_VALUE_TYPES.any? { |type| value.is_a?(type) }
end

def constructor

Other tags:
    Api: - private
def constructor
  options[:constructor] || DEFAULT_CONSTRUCTOR
end

def evaluate

Other tags:
    Api: - private
def evaluate
  @value = constructor[input.equal?(Undefined) ? nil : input]
end

def initialize(name, input: Undefined, default: Undefined, **options)

Other tags:
    Api: - private
def initialize(name, input: Undefined, default: Undefined, **options)
  @name = name
  @writer_name = :"#{name}="
  @input = input.equal?(Undefined) ? default : input
  @default = default
  @options = options
end

def initialize_copy(source)

Other tags:
    Api: - private
def initialize_copy(source)
  super
  @value = source.value.dup if source.clonable_value?
  @options = source.options.dup
end

def nested(settings)

Other tags:
    Api: - private
def nested(settings)
  Nested.new(name, input: settings, **options)
end

def pristine

Other tags:
    Api: - private
def pristine
  with(input: Undefined)
end

def reader?

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

def value

Other tags:
    Api: - private
def value
  @value ||= evaluate
end

def with(new_opts)

Other tags:
    Api: - private
def with(new_opts)
  self.class.new(name, input: input, default: default, **options, **new_opts)
end

def writer?(meth)

Other tags:
    Api: - private
def writer?(meth)
  writer_name.equal?(meth)
end