public Method

Module.private_instance_methods(...)

mod.private_instance_methods(include_super=true)     array

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.

module Mod
  def method1()  end
  private :method1
  def method2()  end
end
Mod.instance_methods           #=> ["method2"]
Mod.private_instance_methods   #=> ["method1"]

Source Code

/*
*  call-seq:
*     mod.private_instance_methods(include_super=true)    => array
*  
*  Returns a list of the private instance methods defined in
*  <i>mod</i>. If the optional parameter is not <code>false</code>, the
*  methods of any ancestors are included.
*     
*     module Mod
*       def method1()  end
*       private :method1
*       def method2()  end
*     end
*     Mod.instance_methods           #=> ["method2"]
*     Mod.private_instance_methods   #=> ["method1"]
*/

VALUE
rb_class_private_instance_methods(argc, argv, mod)
   int argc;
   VALUE *argv;
   VALUE mod;
{
   return class_instance_method_list(argc, argv, mod, ins_methods_priv_i);
}
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.