Class: Module
Instance Method Summary collapse
Instance Method Details
#gen_include(*args) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'ext/texplay/object2module.c', line 144
VALUE
rb_gen_include(int argc, VALUE * argv, VALUE self)
{
int i;
if (argc == 0) rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)");
for(i = 0; i < argc; i++) {
VALUE mod = rb_to_module(argv[i]);
rb_funcall(mod, rb_intern("append_features"), 1, self);
rb_funcall(mod, rb_intern("included"), 1, self);
if(argv[i] != mod) rb_reset_tbls(mod);
}
return self;
}
|
#reset_tbls ⇒ Object
114 115 116 117 118 119 120 |
# File 'ext/texplay/object2module.c', line 114
VALUE
rb_reset_tbls(VALUE self)
{
RCLASS_IV_TBL(self) = (struct st_table *) 0;
RCLASS_M_TBL(self) = (struct st_table *) st_init_numtable();
return Qnil;
}
|