protected(*args)
private
With no arguments, sets the default visibility for subsequently defined
methods to protected. With arguments,
sets the named methods to have protected visibility.
Show source
static VALUE
rb_mod_protected(int argc, VALUE *argv, VALUE module)
{
secure_visibility(module);
if (argc == 0) {
SCOPE_SET(NOEX_PROTECTED);
}
else {
set_method_visibility(module, argc, argv, NOEX_PROTECTED);
}
return module;
}