public(...)
public
With no arguments, sets the default visibility for subsequently defined
methods to public. With arguments, sets
the named methods to have public
visibility.
Show source
/*
* call-seq:
* public => self
* public(symbol, ...) => self
*
* With no arguments, sets the default visibility for subsequently
* defined methods to public. With arguments, sets the named methods to
* have public visibility.
*/
static VALUE
rb_mod_public(argc, argv, module)
int argc;
VALUE *argv;
VALUE module;
{
secure_visibility(module);
if (argc == 0) {
SCOPE_SET(SCOPE_PUBLIC);
}
else {
set_method_visibility(module, argc, argv, NOEX_PUBLIC);
}
return module;
}