class ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter
def cast(value)
Experimental RBS support (using type sampling data from the type_fusion
project).
def cast: (Time value) -> ActiveSupport::TimeWithZone
This signature was generated using 5 samples from 1 application.
def cast(value) return if value.nil? if value.is_a?(Hash) set_time_zone_without_conversion(super) elsif value.respond_to?(:in_time_zone) begin super(user_input_in_time_zone(value)) || super rescue ArgumentError nil end elsif value.respond_to?(:infinite?) && value.infinite? value else map_avoiding_infinite_recursion(super) { |v| cast(v) } end end