Sha256: 66847fe5ff67118a32603d55331667c3717d30b5046a217a2fd6273daecf2c95
Contents?: true
Size: 1.09 KB
Versions: 36
Compression:
Stored size: 1.09 KB
Contents
# require "eitil_core/type_checkers/is_num_or_nan" require "eitil_store/regex/regex" class String def is_nan? self !~ EitilStore::Regex::IsNum end def is_num? !is_nan? end end # Descending classes which are always numeric class Numeric def is_nan? false end def is_num? true end end # Classes which are never numeric class NilClass def is_nan? true end def is_num? false end end class TrueClass def is_nan? true end def is_num? false end end class FalseClass def is_nan? true end def is_num? false end end class Hash def is_nan? true end def is_num? false end end class Array def is_nan? true end def is_num? false end end class Date def is_nan? true end def is_num? false end end class DateTime def is_nan? true end def is_num? false end end class Time def is_nan? true end def is_num? false end end class ActiveSupport::TimeWithZone def is_nan? true end def is_num? false end end
Version data entries
36 entries across 36 versions & 1 rubygems