Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Module#attr_writer

(*::interned arg0) -> ::Array[::Symbol]
attr_writer(symbol, ...) → array
attr_writer(string, ...) → array

Creates an accessor method to allow assignment to the attribute symbol.id2name. String arguments are converted to symbols. Returns an array of defined method names as symbols.

Ruby version changes

  1. 3.0
See also #attr_reader #autoload #attr_accessor #autoload? also in 4.1 · 4.0 · 3.3 · 3.2 · 3.1 · 3.0