Method: Module#append_features
- Defined in:
- eval.c
#append_features(mod) ⇒ Object (private)
When this module is included in another, Ruby calls #append_features in this module, passing it the receiving module in mod. Ruby’s default implementation is to add the constants, methods, and module variables of this module to mod if this module has not already been added to mod or one of its ancestors. See also Module#include.
1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 |
# File 'eval.c', line 1184
static VALUE
rb_mod_append_features(VALUE module, VALUE include)
{
if (!CLASS_OR_MODULE_P(include)) {
Check_Type(include, T_CLASS);
}
rb_include_module(include, module);
return module;
}
|