def self.types()return TYPESend
Gets the DataTypes. Returns an Array
containing the DataType type identifiers.
def self.instance?(obj = nil)​boolean = falseTYPES.each { |type|if (obj.is_a?(type))boolean = trueend}return boolean​end
Predicate. Verifies an object is a DataType type instance. Takes an argument, any object. Returns true
in the case the object is a Numeric
, FalseClass
, Symbol
, TrueClass
, or NilClass
instance. Returns false
otherwise.
def self.type?(type = nil)​types_element = self.types_element?(type)type_child = self.type_child?(type)return (types_element || type_child)​end