class ActiveModel::LazyAttributeSet
def fetch_value(name, &block)
Experimental RBS support (using type sampling data from the type_fusion
project).
type ActiveModel__LazyAttributeSet_fetch_value_return_value = String | Integer | nil | Date | true def fetch_value: (String name, ) -> ActiveModel__LazyAttributeSet_fetch_value_return_value
This signature was generated using 325 samples from 2 applications.
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