Class: Class
Instance Method Summary collapse
-
#attached ⇒ Object
get the attached class if receiver is a singleton class.
-
#attached=(klass) ⇒ Object
set the attached class if receiver is a singleton class.
-
#is_singleton?(klass) ⇒ Boolean
is the object a singleton class ?.
Instance Method Details
#attached ⇒ Object
get the attached class if receiver is a singleton class
94 95 96 97 98 99 100 101 |
# File 'ext/mult/mult.c', line 94 static VALUE get_attached(VALUE self) { if(FL_TEST(self, FL_SINGLETON)) return rb_iv_get(self, "__attached__"); else return Qnil; } |
#attached=(klass) ⇒ Object
set the attached class if receiver is a singleton class
104 105 106 107 108 109 110 111 112 |
# File 'ext/mult/mult.c', line 104 static VALUE set_attached(VALUE self, VALUE klass) { if(FL_TEST(self, FL_SINGLETON)) { rb_iv_set(self, "__attached__", klass); return self; } else return Qnil; } |
#is_singleton?(klass) ⇒ Boolean
is the object a singleton class ?
62 63 64 65 |
# File 'ext/mult/mult.c', line 62 static VALUE is_singleton(VALUE self, VALUE klass) { return FL_TEST(self, FL_SINGLETON) ? Qtrue : Qfalse; } |