class ActiveModel::Type::String
Experimental RBS support (using type sampling data from the type_fusion
project).
# sig/active_model/type/string.rbs class ActiveModel::Type::String < ActiveModel::Type::ImmutableString def cast_value: (String value) -> String end
:nodoc:
def cast_value(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
def cast_value: (String value) -> String
This signature was generated using 31 samples from 1 application.
def cast_value(value) case value when ::String then ::String.new(value) when true then @true when false then @false else value.to_s end end
def changed_in_place?(raw_old_value, new_value)
def changed_in_place?(raw_old_value, new_value) if new_value.is_a?(::String) raw_old_value != new_value end end
def to_immutable_string
def to_immutable_string ImmutableString.new( true: @true, false: @false, limit: limit, precision: precision, scale: scale, ) end