APIdock / Ruby
/
method

remove_method

ruby latest stable - Class: Module
remove_method(*args)
public

Removes the method identified by symbol from the current class. For an example, see Module.undef_method. String arguments are converted to symbols.

static VALUE
rb_mod_remove_method(int argc, VALUE *argv, VALUE mod)
{
 int i;
 for (i = 0; i < argc; i++) {
 VALUE v = argv[i];
 ID id = rb_check_id(&v);
 if (!id) {
 rb_name_err_raise("method `%1$s' not defined in %2$s",
 mod, v);
 }
 remove_method(mod, id);
 }
 return mod;
}

AltStyle によって変換されたページ (->オリジナル) /