attr_reader(*args)
public
Creates instance variables and corresponding methods that return the value
of each instance variable. Equivalent to calling “attr:name” on each name in turn. String arguments are converted to symbols.
Show source
static VALUE
rb_mod_attr_reader(int argc, VALUE *argv, VALUE klass)
{
int i;
for (i=0; i<argc; i++) {
rb_attr(klass, id_for_attr(klass, argv[i]), TRUE, FALSE, TRUE);
}
return Qnil;
}