Skip to content
Poignant Guide Ruby Q&A
Sections

attr_writer

1 thread tagged with this topic

Threads tagged attr_writer

  1. ✓

    How do attr_accessor, attr_reader and attr_writer work in Ruby?

    They write small methods for you. attrreader creates a method that returns an instance variable, attrwriter creates a method that sets it, and attraccessor...

    Classes, modules and objectsOdile MarchettiStaff answer
    0replies
Poignant Guide Ruby Q&A. Questions and answers on learning Ruby and programming: syntax, blocks, objects, gems, Rails, debugging and reading the Poignant Guide.