If you write:
attr_writer :age
It is the equivalent of:
def age=(value)
@age = value
end
Writing:
attr_reader :age
That gets translated into:
def age
@age
end
Writing:
attr_accessor :age
Is translated to:
def age=(value)
@age = value
end
and
def age
@age
end