Sha256: 75d3600e31df234af5cd7d6716ac26a47a79e574738c277e51060f77ad28f30b
Contents?: true
Size: 771 Bytes
Versions: 40
Compression:
Stored size: 771 Bytes
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
Version data entries
40 entries across 40 versions & 1 rubygems