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
For example: class C protected def foo end end p C.protected_instance_methods(false)
outputs: ["foo"]