Use attr_accessor to simplify read and write methods