public Method

Kernel.autoload?(p1)

autoload(module, filename)    nil

Registers filename to be loaded (using Kernel::require) the first time that module (which may be a String or a symbol) is accessed.

autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")

Source Code

/*
*  call-seq:
*     autoload(module, filename)   => nil
*
*  Registers _filename_ to be loaded (using <code>Kernel::require</code>)
*  the first time that _module_ (which may be a <code>String</code> or
*  a symbol) is accessed.
*
*     autoload(:MyModule, "/usr/local/lib/modules/my_module.rb")
*/

static VALUE
rb_f_autoload_p(obj, sym)
   VALUE obj;
   VALUE sym;
{
   /* use ruby_cbase as same as rb_f_autoload. */
   if (NIL_P(ruby_cbase)) {
       return Qfalse;
   }
   return rb_mod_autoload_p(ruby_cbase, sym);
}
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.