public Method

Module.autoload?(p1)

mod.autoload?(name)    String or nil

Returns filename to be loaded if name is registered as autoload in the namespace of mod.

module A
end
A.autoload(:B, "b")
A.autoload?(:B)            # => "b"

Source Code

/*
*  call-seq:
*     mod.autoload?(name)   => String or nil
*
*  Returns _filename_ to be loaded if _name_ is registered as
*  +autoload+ in the namespace of _mod_.
*
*     module A
*     end
*     A.autoload(:B, "b")
*     A.autoload?(:B)            # => "b"
*/

static VALUE
rb_mod_autoload_p(mod, sym)
   VALUE mod, sym;
{
   return rb_autoload_p(mod, rb_to_id(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.