From: "Marcin Mielżyński" Date: 2006-09-17T21:36:11+09:00 Subject: Re: Why don't these writable atributes work? Edward wrote: > Both of these code examples for making class properties don't work > although they are pretty much straight out of the book "Programming > Ruby". What I am doing wrong here? > > error is: undefined method `firstName' for # @firstName="Newton"> (NoMethodError) > ---------------------- you didn't create an attribute reader: attr_accessor :firstName - creates both reader and writer attr_writer :firstName - creates a writer attr_reader :firstName - creates a reader (the one that you need) You can also create a reader by hand: def firstName @firstName end lopex