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.

Show source
Register or log in to add new notes.
February 8, 2009
0 thanks

Can be used on classes, too

For example:

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

outputs:

["foo"]