Sha256: 9cdc0d5b7b96deb2c0f48224a3d2cb3623f0539540f0d11c0eb17cb30ac20569
Contents?: true
Size: 459 Bytes
Versions: 38
Compression:
Stored size: 459 Bytes
Contents
module ActiveModel module Type class Float < Value # :nodoc: include Helpers::Numeric def type :float end alias serialize cast private def cast_value(value) case value when ::Float then value when "Infinity" then ::Float::INFINITY when "-Infinity" then -::Float::INFINITY when "NaN" then ::Float::NAN else value.to_f end end end end end
Version data entries
38 entries across 37 versions & 5 rubygems