Maybe you can use [attr_accessor] to define writer and reader