The ':class' message selector will cause a method to run that will return the object which is the class of the specified 'object'. Note that the returned value is an object which will look like:
#<Object: #18d8c>
The 'object' must exist or an error will be generated:
error: bad argument type
(send object :class) ; returns the CLASS object (send class :class) ; returns the CLASS object (setq new-cls (send class :new '(var))) ; create NEW-CLS (setq new-obj (send new-cls :new)) ; create NEW-OBJ of NEW-CLS (send new-obj :class) ; returns the NEW-CLS object (send new-cls :class) ; returns the CLASS object
See the
:class
message selector in the