mrb_define_singleton_method - cremno/mruby GitHub Wiki
mrb_define_singleton_method
| Declaration | Definition |
|---|---|
| mruby.h | class.c |
void mrb_define_singleton_method(mrb_state *mrb, struct RObject *obj, const char *name, mrb_func_t func, mrb_aspec aspec)
Defines a new singleton method.
Parameters
- mrb: mruby VM state
- obj: object of the new singleton method
- name: name of the singleton method
- func: function pointer
- aspec: argument spec
Return value
None.