public Method

Module.attr_writer(...)

attr_writer(symbol, ...)     nil

Creates an accessor method to allow assignment to the attribute aSymbol.id2name.

Source Code

/*
*  call-seq:
*      attr_writer(symbol, ...)    => nil
*  
*  Creates an accessor method to allow assignment to the attribute
*  <i>aSymbol</i><code>.id2name</code>.
*/

static VALUE
rb_mod_attr_writer(argc, argv, klass)
   int argc;
   VALUE *argv;
   VALUE klass;
{
   int i;

   for (i=0; i<argc; i++) {
       rb_attr(klass, rb_to_id(argv[i]), 0, 1, Qtrue);
   }
   return Qnil;
}
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.