public Method

Object.private_methods(...)

obj.private_methods(all=true)    array

Returns the list of private methods accessible to obj. If the all parameter is set to false, only those methods in the receiver will be listed.

Source Code

/*
*  call-seq:
*     obj.private_methods(all=true)   => array
*  
*  Returns the list of private methods accessible to <i>obj</i>. If
*  the <i>all</i> parameter is set to <code>false</code>, only those methods
*  in the receiver will be listed.
*/

static VALUE
rb_obj_private_methods(argc, argv, obj)
   int argc;
   VALUE *argv;
   VALUE obj;
{
   if (argc == 0) {            /* hack to stop warning */
       VALUE args[1];

       args[0] = Qtrue;
       return rb_class_private_instance_methods(1, args, CLASS_OF(obj));
   }
   return rb_class_private_instance_methods(argc, argv, CLASS_OF(obj));
}
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.