Skip to content

mrb_singleton_class

cremno edited this page Sep 11, 2013 · 2 revisions

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.

See also

Clone this wiki locally