private_instance_methods

mod.private_instance_methods(include_super=true) â array
Instance Public methods

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

1
2
3
4
5
6
7
module Mod
  def method1()  end
  private :method1
  def method2()  end
end
Mod.instance_methods           #=> [:method2]
Mod.private_instance_methods   #=> [:method1]
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.