method

protected_instance_methods

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

Returns a list of the protected instance methods defined in mod. If the optional parameter is false, the methods of any ancestors are not included.

1Note

Can be used on classes, too

szeryf · Feb 8, 2009

For example: class C protected def foo end end p C.protected_instance_methods(false)

outputs: ["foo"]