Method: Module#attr_reader

Defined in:
object.c

#attr_reader(symbol, ...) ⇒ nil (private)

Creates instance variables and corresponding methods that return the value of each instance variable. Equivalent to calling “attr:name” on each name in turn.

Returns:

  • (nil)


1719
1720
1721
# File 'object.c', line 1719

static VALUE
rb_mod_attr_reader(argc, argv, klass)
int argc;