class ActiveModel::Type::Value
def cast(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
def cast: ((Integer | nil | Float) value) -> (Integer | nil | Float)
This signature was generated using 3 samples from 1 application.
Value#cast_value.
ActiveRecord::AttributeMethods::Read#read_attribute. See also:
The return value of this method will be returned from
from.
There is currently no way to differentiate between which source it came
be a string from the form builder, or a ruby object passed to a setter.
Type casts a value from user input (e.g. from a setter). This value may
def cast(value) cast_value(value) unless value.nil? end