protected_instance_methods(...) public

Returns a list of the protected instance methods defined in mod. If the optional parameter is not false, the methods of any ancestors are 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"]