class ActiveModel::LazyAttributeSet

def fetch_value(name, &block)

Experimental RBS support (using type sampling data from the type_fusion project).

def fetch_value: (String name, ) -> Integer

This signature was generated using 5 samples from 1 application.

def fetch_value(name, &block)
  if attr = @attributes[name]
    return attr.value(&block)
  end
  @casted_values.fetch(name) do
    value_present = true
    value = values.fetch(name) { value_present = false }
    if value_present
      type = additional_types.fetch(name, types[name])
      @casted_values[name] = type.deserialize(value)
    else
      attr = default_attribute(name, value_present, value)
      attr.value(&block)
    end
  end
end