mrb_singleton_class - cremno/mruby GitHub Wiki
mrb_singleton_class
| Declaration | Definition |
|---|---|
| mruby.h | class.c |
mrb_value mrb_singleton_class(mrb_state *mrb, mrb_value obj);
Returns the singleton class if obj has one. Otherwise it will be defined. A TypeError is raised if obj is a Fixnum, Float or Symbol.
Parameters
- mrb: mruby VM state
- obj: an object
Return value
The singleton class.